Skip to content
Snippets Groups Projects
Commit 7d3eaede authored by Julien Malik's avatar Julien Malik
Browse files

BUG: fix non-const Modified()

parent 630903dd
No related branches found
No related tags found
No related merge requests found
...@@ -169,7 +169,7 @@ protected: ...@@ -169,7 +169,7 @@ protected:
/** Allocate the outputs (need to be reimplemented since outputs have differents type) */ /** Allocate the outputs (need to be reimplemented since outputs have differents type) */
virtual void AllocateOutputs(); virtual void AllocateOutputs();
/** If modified, we have to reset the list of modes */ /** If modified, we have to reset the list of modes */
virtual void Modified() virtual void Modified() const
{ {
Superclass::Modified(); Superclass::Modified();
m_Modes.clear(); m_Modes.clear();
...@@ -196,7 +196,7 @@ private: ...@@ -196,7 +196,7 @@ private:
/** Data scale (used to stretch data range) */ /** Data scale (used to stretch data range) */
double m_Scale; double m_Scale;
/** A map of the different modes by segmented regions */ /** A map of the different modes by segmented regions */
ModeMapType m_Modes; mutable ModeMapType m_Modes;
}; };
} // end namespace otb } // end namespace otb
......
...@@ -130,7 +130,7 @@ public: ...@@ -130,7 +130,7 @@ public:
const RegionType& region); const RegionType& region);
/** Make the Modified() method update the IsUpToDate flag */ /** Make the Modified() method update the IsUpToDate flag */
virtual void Modified() virtual void Modified() const
{ {
// Call superclass implementation // Call superclass implementation
Superclass::Modified(); Superclass::Modified();
...@@ -171,7 +171,7 @@ private: ...@@ -171,7 +171,7 @@ private:
StreamVectorType m_StreamVector; StreamVectorType m_StreamVector;
// Is the splitter up-to-date ? // Is the splitter up-to-date ?
bool m_IsUpToDate; mutable bool m_IsUpToDate;
// Lock to ensure thread-safety // Lock to ensure thread-safety
itk::SimpleFastMutexLock m_Lock; itk::SimpleFastMutexLock m_Lock;
......
...@@ -111,7 +111,7 @@ protected: ...@@ -111,7 +111,7 @@ protected:
virtual void ComputeLength() const; virtual void ComputeLength() const;
virtual void ComputeBoundingRegion() const; virtual void ComputeBoundingRegion() const;
virtual void Modified(); virtual void Modified() const;
private: private:
PolyLineParametricPathWithValue(const Self &); //purposely not implemented PolyLineParametricPathWithValue(const Self &); //purposely not implemented
......
...@@ -193,7 +193,7 @@ PolyLineParametricPathWithValue<TValue, VDimension> ...@@ -193,7 +193,7 @@ PolyLineParametricPathWithValue<TValue, VDimension>
template <class TValue, unsigned int VDimension> template <class TValue, unsigned int VDimension>
void void
PolyLineParametricPathWithValue<TValue, VDimension> PolyLineParametricPathWithValue<TValue, VDimension>
::Modified() ::Modified() const
{ {
m_LengthIsValid = false; m_LengthIsValid = false;
m_BoundingRegionIsValid = false; m_BoundingRegionIsValid = false;
......
...@@ -151,7 +151,7 @@ protected: ...@@ -151,7 +151,7 @@ protected:
virtual void PrintSelf(std::ostream& os, itk::Indent indent) const; virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
virtual void ComputeArea() const; virtual void ComputeArea() const;
virtual void Modified(); virtual void Modified() const;
private: private:
Polygon(const Self &); //purposely not implemented Polygon(const Self &); //purposely not implemented
......
...@@ -527,7 +527,7 @@ double Polygon<TValue> ...@@ -527,7 +527,7 @@ double Polygon<TValue>
template <class TValue> template <class TValue>
void void
Polygon<TValue> Polygon<TValue>
::Modified() ::Modified() const
{ {
Superclass::Modified(); Superclass::Modified();
m_AreaIsValid = false; m_AreaIsValid = false;
......
...@@ -190,7 +190,7 @@ protected: ...@@ -190,7 +190,7 @@ protected:
GenericRSTransform(); GenericRSTransform();
virtual ~GenericRSTransform() {} virtual ~GenericRSTransform() {}
virtual void Modified() virtual void Modified() const
{ {
this->Superclass::Modified(); this->Superclass::Modified();
m_TransformUpToDate = false; m_TransformUpToDate = false;
...@@ -223,7 +223,7 @@ private: ...@@ -223,7 +223,7 @@ private:
GenericTransformPointerType m_InputTransform; GenericTransformPointerType m_InputTransform;
GenericTransformPointerType m_OutputTransform; GenericTransformPointerType m_OutputTransform;
bool m_TransformUpToDate; mutable bool m_TransformUpToDate;
Projection::TransformAccuracy m_TransformAccuracy; Projection::TransformAccuracy m_TransformAccuracy;
}; };
......
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