Skip to content
Snippets Groups Projects
Commit 4c56ad24 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[App/IO] AsciiRasterIF. Cleanup iterator usage.

Return immideately.
parent dcd9ce8d
No related branches found
No related tags found
No related merge requests found
...@@ -67,10 +67,8 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromASCFile( ...@@ -67,10 +67,8 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromASCFile(
} }
} }
in.close(); in.close();
GeoLib::Raster* raster(new GeoLib::Raster( return new GeoLib::Raster(std::move(header), values.begin(),
std::move(header), values.data(), values.data() + values.size())); values.end());
return raster;
} }
WARN("Raster::getRasterFromASCFile(): Could not read header of file {:s}", WARN("Raster::getRasterFromASCFile(): Could not read header of file {:s}",
fname); fname);
...@@ -194,10 +192,8 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromSurferFile( ...@@ -194,10 +192,8 @@ GeoLib::Raster* AsciiRasterInterface::getRasterFromSurferFile(
} }
} }
in.close(); in.close();
GeoLib::Raster* raster(new GeoLib::Raster( return new GeoLib::Raster(std::move(header), values.begin(),
std::move(header), values.data(), values.data() + values.size())); values.end());
return raster;
} }
ERR("Raster::getRasterFromASCFile() - could not read header of file {:s}", ERR("Raster::getRasterFromASCFile() - could not read header of file {:s}",
fname); fname);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment