diff --git a/Modules/Adapters/GdalAdapters/include/otbOGRExtendedFilenameToOptions.h b/Modules/Adapters/GdalAdapters/include/otbOGRExtendedFilenameToOptions.h index 3b7b34653e11d8e1554bf28ce097c2d4b9fe2d0a..91ada317804ae9791e309b051cacde7a3d992932 100644 --- a/Modules/Adapters/GdalAdapters/include/otbOGRExtendedFilenameToOptions.h +++ b/Modules/Adapters/GdalAdapters/include/otbOGRExtendedFilenameToOptions.h @@ -45,7 +45,7 @@ public: typedef ExtendedFilenameHelper Superclass; typedef Superclass::OptionMapType OptionMapType; - typedef OptionMapType::iterator MapIteratorType; + typedef OptionMapType::const_iterator ConstMapIteratorType; typedef std::vector<std::string> GDALOptionType; itkTypeMacro(OGRExtendedFilenameToOptions, otb::ExtendedFilenameHelper); diff --git a/Modules/Adapters/GdalAdapters/src/otbOGRExtendedFilenameToOptions.cxx b/Modules/Adapters/GdalAdapters/src/otbOGRExtendedFilenameToOptions.cxx index 4e760c74cb6e183d3f9f6083c2bba1028867fe9e..a34e70947138645f0d660570c6abdefedb7aa141 100644 --- a/Modules/Adapters/GdalAdapters/src/otbOGRExtendedFilenameToOptions.cxx +++ b/Modules/Adapters/GdalAdapters/src/otbOGRExtendedFilenameToOptions.cxx @@ -56,9 +56,9 @@ SetExtendedFileName(const char *extFname) Superclass::SetExtendedFileName(extFname); m_HasFileName = true; - OptionMapType map = GetOptionMap(); + const OptionMapType & map = GetOptionMap(); - MapIteratorType it; + ConstMapIteratorType it; for ( it=map.begin(); it != map.end(); it++ ) { std::vector<std::string> tmp; @@ -144,9 +144,7 @@ bool OGRExtendedFilenameToOptions:: HasGDALLayerOption() const { - if ( m_LayerOptions.gdalOptions.empty() ) - return false; - return true; + return ! m_LayerOptions.gdalOptions.empty() ; } OGRExtendedFilenameToOptions::