diff --git a/Code/BasicFilters/otbMeanShiftImageFilter.h b/Code/BasicFilters/otbMeanShiftImageFilter.h index 364f7ce948563ae203c1a6ec0a33ad6b3fc40756..8c34617d8f72777521dc060d1f2fcd6cc83ba547 100644 --- a/Code/BasicFilters/otbMeanShiftImageFilter.h +++ b/Code/BasicFilters/otbMeanShiftImageFilter.h @@ -169,7 +169,7 @@ protected: /** Allocate the outputs (need to be reimplemented since outputs have differents type) */ virtual void AllocateOutputs(); /** If modified, we have to reset the list of modes */ - virtual void Modified() + virtual void Modified() const { Superclass::Modified(); m_Modes.clear(); @@ -196,7 +196,7 @@ private: /** Data scale (used to stretch data range) */ double m_Scale; /** A map of the different modes by segmented regions */ - ModeMapType m_Modes; + mutable ModeMapType m_Modes; }; } // end namespace otb diff --git a/Code/Common/otbImageRegionAdaptativeSplitter.h b/Code/Common/otbImageRegionAdaptativeSplitter.h index 30ecedd5b4a23329a1b9336e74c5059a05f36836..b4a434548202ba3170db231ddaa604a1b7863eca 100644 --- a/Code/Common/otbImageRegionAdaptativeSplitter.h +++ b/Code/Common/otbImageRegionAdaptativeSplitter.h @@ -130,7 +130,7 @@ public: const RegionType& region); /** Make the Modified() method update the IsUpToDate flag */ - virtual void Modified() + virtual void Modified() const { // Call superclass implementation Superclass::Modified(); @@ -171,7 +171,7 @@ private: StreamVectorType m_StreamVector; // Is the splitter up-to-date ? - bool m_IsUpToDate; + mutable bool m_IsUpToDate; // Lock to ensure thread-safety itk::SimpleFastMutexLock m_Lock; diff --git a/Code/Common/otbPolyLineParametricPathWithValue.h b/Code/Common/otbPolyLineParametricPathWithValue.h index 9c6b0418906b23feb6b9be872d5b3d77e9428733..a63bb4a3767389eeb4ff0f61bbdf777ed03f019a 100644 --- a/Code/Common/otbPolyLineParametricPathWithValue.h +++ b/Code/Common/otbPolyLineParametricPathWithValue.h @@ -111,7 +111,7 @@ protected: virtual void ComputeLength() const; virtual void ComputeBoundingRegion() const; - virtual void Modified(); + virtual void Modified() const; private: PolyLineParametricPathWithValue(const Self &); //purposely not implemented diff --git a/Code/Common/otbPolyLineParametricPathWithValue.txx b/Code/Common/otbPolyLineParametricPathWithValue.txx index 1877346e7707bc9b0d7d1972e1e8b30f16324caf..36cd8e53b07c5aa925698f9f4fe759b15fed5cc3 100644 --- a/Code/Common/otbPolyLineParametricPathWithValue.txx +++ b/Code/Common/otbPolyLineParametricPathWithValue.txx @@ -193,7 +193,7 @@ PolyLineParametricPathWithValue<TValue, VDimension> template <class TValue, unsigned int VDimension> void PolyLineParametricPathWithValue<TValue, VDimension> -::Modified() +::Modified() const { m_LengthIsValid = false; m_BoundingRegionIsValid = false; diff --git a/Code/Common/otbPolygon.h b/Code/Common/otbPolygon.h index 2086fa81ab64f33c9740ef620b4f5e97476200cd..fb19c026ebe9dbbd6d3a978dcc14e744a9a36c24 100644 --- a/Code/Common/otbPolygon.h +++ b/Code/Common/otbPolygon.h @@ -151,7 +151,7 @@ protected: virtual void PrintSelf(std::ostream& os, itk::Indent indent) const; virtual void ComputeArea() const; - virtual void Modified(); + virtual void Modified() const; private: Polygon(const Self &); //purposely not implemented diff --git a/Code/Common/otbPolygon.txx b/Code/Common/otbPolygon.txx index b17ffe1e1610d71e70d5b66be4ee911c68890438..fcc72e470e984070a2c216683e6dde559e9269a4 100644 --- a/Code/Common/otbPolygon.txx +++ b/Code/Common/otbPolygon.txx @@ -527,7 +527,7 @@ double Polygon<TValue> template <class TValue> void Polygon<TValue> -::Modified() +::Modified() const { Superclass::Modified(); m_AreaIsValid = false; diff --git a/Code/Projections/otbGenericRSTransform.h b/Code/Projections/otbGenericRSTransform.h index 4a0bed472e2c8b4e5aab5045bca5aeecc0142205..6c9601387d3c48143f6db569a441444240ba0b57 100644 --- a/Code/Projections/otbGenericRSTransform.h +++ b/Code/Projections/otbGenericRSTransform.h @@ -190,7 +190,7 @@ protected: GenericRSTransform(); virtual ~GenericRSTransform() {} - virtual void Modified() + virtual void Modified() const { this->Superclass::Modified(); m_TransformUpToDate = false; @@ -223,7 +223,7 @@ private: GenericTransformPointerType m_InputTransform; GenericTransformPointerType m_OutputTransform; - bool m_TransformUpToDate; + mutable bool m_TransformUpToDate; Projection::TransformAccuracy m_TransformAccuracy; };