Browse Source

Make comparison operators const.

newinvert
Kuba Sunderland-Ober 2 years ago
committed by Ian McInerney
parent
commit
b60f7d4136
  1. 2
      common/tool/selection.cpp
  2. 4
      include/enum_vector.h
  3. 2
      include/tool/selection.h
  4. 2
      pcbnew/dialogs/dialog_board_statistics.h

2
common/tool/selection.cpp

@ -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

4
include/enum_vector.h

@ -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 */

2
include/tool/selection.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;

2
pcbnew/dialogs/dialog_board_statistics.h

@ -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…
Cancel
Save