Make comparison operators const.
This commit is contained in:
parent
5b4ddaba89
commit
b60f7d4136
|
@ -29,7 +29,7 @@
|
|||
#include <tool/selection.h>
|
||||
|
||||
|
||||
bool SELECTION::operator==( const SELECTION& aOther )
|
||||
bool SELECTION::operator==( const SELECTION& aOther ) const
|
||||
{
|
||||
return ( m_items == aOther.m_items
|
||||
&& m_itemsOrders == aOther.m_itemsOrders
|
||||
|
|
|
@ -92,8 +92,8 @@ public:
|
|||
T operator*() { return static_cast<T>( val ); }
|
||||
ENUM_ITERATOR begin() { return *this; }
|
||||
ENUM_ITERATOR end() { return ENUM_ITERATOR( endVal ); }
|
||||
bool operator==( const ENUM_ITERATOR& aIt ) { return val == aIt.val; }
|
||||
bool operator!=( const ENUM_ITERATOR& aIt ) { return val != aIt.val; }
|
||||
bool operator==( const ENUM_ITERATOR& aIt ) const { return val == aIt.val; }
|
||||
bool operator!=( const ENUM_ITERATOR& aIt ) const { return val != aIt.val; }
|
||||
};
|
||||
|
||||
#endif /* ENUM_VECTOR_H */
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
bool operator==( const SELECTION& aOther );
|
||||
bool operator==( const SELECTION& aOther ) const;
|
||||
|
||||
using ITER = std::deque<EDA_ITEM*>::iterator;
|
||||
using CITER = std::deque<EDA_ITEM*>::const_iterator;
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
bool operator==( const DRILL_LINE_ITEM& other )
|
||||
bool operator==( const DRILL_LINE_ITEM& other ) const
|
||||
{
|
||||
return xSize == other.xSize && ySize == other.ySize && shape == other.shape
|
||||
&& isPlated == other.isPlated && isPad == other.isPad
|
||||
|
|
Loading…
Reference in New Issue