From 43dcbb16398f7688dd3b49f5b1e688311c9740ed Mon Sep 17 00:00:00 2001 From: TomFischer <thomas.fischer@ufz.de> Date: Wed, 11 Jan 2023 12:53:08 +0000 Subject: [PATCH] [A/IO/AsciiRasterInterface] Reduce scope of std::vector values --- Applications/FileIO/AsciiRasterInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Applications/FileIO/AsciiRasterInterface.cpp b/Applications/FileIO/AsciiRasterInterface.cpp index 9dbd7fa552d..bdbcc0ece27 100644 --- a/Applications/FileIO/AsciiRasterInterface.cpp +++ b/Applications/FileIO/AsciiRasterInterface.cpp @@ -268,12 +268,13 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromXyzFile( return nullptr; } - std::vector<double> values; auto coords = readCoordinates(in); if (coords == std::nullopt) { return nullptr; } + + std::vector<double> values; values.push_back((*coords)[2]); auto coords2 = readCoordinates(in); -- GitLab