Skip to content
Snippets Groups Projects
Commit 83c13fe4 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: Mantis-932: temporary allocated string

parent f01746a6
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ private:
{
clock_t tic = clock();
const char * shapefile = GetParameterString("out").c_str();
std::string shapefile(GetParameterString("out"));
unsigned long sizeTilesX = GetParameterInt("tilesizex");
unsigned long sizeTilesY = GetParameterInt("tilesizey");
......@@ -161,8 +161,8 @@ private:
std::vector<std::string> options;
ogrDS = otb::ogr::DataSource::New(shapefile, otb::ogr::DataSource::Modes::Overwrite);
std::string layername = itksys::SystemTools::GetFilenameName(shapefile);
std::string extension = itksys::SystemTools::GetFilenameLastExtension(shapefile);
std::string layername = itksys::SystemTools::GetFilenameName(shapefile.c_str());
std::string extension = itksys::SystemTools::GetFilenameLastExtension(shapefile.c_str());
layername = layername.substr(0,layername.size()-(extension.size()));
layer = ogrDS->CreateLayer(layername, &oSRS, wkbMultiPolygon, options);
......
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