Commit 59c5d11c authored by Antoine Regimbeau's avatar Antoine Regimbeau

REFAC: objectlist derived from boost::noncopyable and const & in for loop

parent 3801570f
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment