Make compare operators const methods

parent 587fd452
......@@ -66,7 +66,7 @@ GeoDataHotSpot& GeoDataHotSpot::operator=( const GeoDataHotSpot& other )
return *this;
}
bool GeoDataHotSpot::operator==( const GeoDataHotSpot& other )
bool GeoDataHotSpot::operator==( const GeoDataHotSpot& other ) const
{
return equals(other) &&
d->m_hotSpot == other.d->m_hotSpot &&
......@@ -74,7 +74,7 @@ bool GeoDataHotSpot::operator==( const GeoDataHotSpot& other )
d->m_yunits == other.d->m_yunits;
}
bool GeoDataHotSpot::operator!=( const GeoDataHotSpot& other )
bool GeoDataHotSpot::operator!=( const GeoDataHotSpot& other ) const
{
return !this->operator==(other);
}
......
......@@ -35,8 +35,8 @@ class GEODATA_EXPORT GeoDataHotSpot : public GeoDataObject
~GeoDataHotSpot();
GeoDataHotSpot& operator=( const GeoDataHotSpot& other );
bool operator==( const GeoDataHotSpot& other );
bool operator!=( const GeoDataHotSpot& other );
bool operator==( const GeoDataHotSpot& other ) const;
bool operator!=( const GeoDataHotSpot& other ) const;
/// Provides type information for downcasting a GeoData
virtual const char* nodeType() const;
......
......@@ -53,7 +53,7 @@ GeoDataImagePyramid &GeoDataImagePyramid::operator=( const GeoDataImagePyramid &
return *this;
}
bool GeoDataImagePyramid::operator==( const GeoDataImagePyramid& other )
bool GeoDataImagePyramid::operator==( const GeoDataImagePyramid& other ) const
{
return equals(other) &&
d->m_tileSize == other.d->m_tileSize &&
......@@ -62,7 +62,7 @@ bool GeoDataImagePyramid::operator==( const GeoDataImagePyramid& other )
d->m_gridOrigin == other.d->m_gridOrigin;
}
bool GeoDataImagePyramid::operator!=( const GeoDataImagePyramid& other )
bool GeoDataImagePyramid::operator!=( const GeoDataImagePyramid& other ) const
{
return !this->operator==(other);
}
......
......@@ -27,8 +27,8 @@ public:
GeoDataImagePyramid( const GeoDataImagePyramid &other );
GeoDataImagePyramid& operator=( const GeoDataImagePyramid &other );
bool operator==( const GeoDataImagePyramid &other );
bool operator!=( const GeoDataImagePyramid &other );
bool operator==( const GeoDataImagePyramid &other ) const;
bool operator!=( const GeoDataImagePyramid &other ) const;
~GeoDataImagePyramid();
......
......@@ -330,11 +330,11 @@ public:
return _leftToRight.operator[](t);
}
bool operator==(const KBiAssociativeContainer<LeftContainer, RightContainer> &other) {
bool operator==(const KBiAssociativeContainer<LeftContainer, RightContainer> &other) const {
return _leftToRight.operator == (other._leftToRight);
}
bool operator!=(const KBiAssociativeContainer<LeftContainer, RightContainer> &other) {
bool operator!=(const KBiAssociativeContainer<LeftContainer, RightContainer> &other) const {
return _leftToRight.operator != (other._leftToRight);
}
......
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