diff --git a/Modules/Core/ObjectList/include/otbObjectListInterface.h b/Modules/Core/ObjectList/include/otbObjectListInterface.h index 8b920a40ef0a3e3396567ac70c49d33c91c804d9..bec8e87838fbc19cd14dad95a3daaebdff32b7a9 100644 --- a/Modules/Core/ObjectList/include/otbObjectListInterface.h +++ b/Modules/Core/ObjectList/include/otbObjectListInterface.h @@ -22,11 +22,12 @@ #define otbObjectListInterface_h #include "itkDataObject.h" +#include "boost/core/noncopyable.hpp" namespace otb { -class ObjectListInterface +class ObjectListInterface : public boost::noncopyable { /** \class ObjectListInterface * \brief This non template class is an interface that wrapp ObjectList @@ -37,10 +38,6 @@ class ObjectListInterface * \ingroup ObjectListInterface */ public: - - ObjectListInterface() {}; - virtual ~ObjectListInterface(){}; - /** Get the nth element of the list as a DataObject *. */ @@ -48,6 +45,9 @@ public: virtual std::size_t Size(void) const = 0; +protected: + ObjectListInterface() = default ; + virtual ~ObjectListInterface() = default ; }; } // end of otb namespace diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 8cb9b8eee20595884a6df5394a8da52e11aa891b..144b22429ebd4e7fb908816a3b20150768bcee6c 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -511,11 +511,8 @@ void Application::FreeRessources() std::set< itk::DataObject * > dataSet; std::vector<std::string> paramList = GetParametersKeys(true); // Get the end of the pipeline - for (std::vector<std::string>::const_iterator it = paramList.begin(); - it != paramList.end(); - ++it) + for ( const auto & key : paramList ) { - std::string key = *it; if ( GetParameterType(key) == ParameterType_OutputImage ) { Parameter* param = GetParameterByKey(key);