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:
/** 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
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -527,7 +527,7 @@ double Polygon<TValue>
template <class TValue>
void
Polygon<TValue>
::Modified()
::Modified() const
{
Superclass::Modified();
m_AreaIsValid = false;
......
......@@ -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;
};
......
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