From c87f4d312b987f65718152210639a8a405b84086 Mon Sep 17 00:00:00 2001 From: Timo Koch <timokoch@math.uio.no> Date: Sun, 22 Jan 2023 19:34:18 +0000 Subject: [PATCH] [cleanup][io] Small fixes in raster image reader --- dumux/io/rasterimagereader.hh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dumux/io/rasterimagereader.hh b/dumux/io/rasterimagereader.hh index 038377f3bf..5bd302fc0a 100644 --- a/dumux/io/rasterimagereader.hh +++ b/dumux/io/rasterimagereader.hh @@ -300,9 +300,8 @@ public: std::vector<OutputValueType> data; data.reserve(image.size()*image[0].size()); - for (const auto& row: image) - for (const auto col : row) - data.push_back(col); + for (const auto& row : image) + data.insert(data.end(), row.begin(), row.end()); return data; } @@ -478,8 +477,6 @@ private: static std::vector<ValueType> readPGMDataBinary_(std::ifstream& infile, const HeaderData& headerData) { - std::string inputLine; - // check the size of the binary part of the file const auto curPos = infile.tellg(); infile.seekg(0, std::ios::end); -- GitLab