diff --git a/common/common.cpp b/common/common.cpp index c547b60f39..8c5c058a00 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -386,3 +386,12 @@ size_t std::hash::operator()( const wxString& s ) const return std::hash{}( s.ToStdWstring() ); } #endif + + +bool std::less::operator()( const wxPoint& aA, const wxPoint& aB ) const +{ + if( aA.x == aB.x ) + return aA.y < aB.y; + + return aA.x < aB.x; +} diff --git a/include/common.h b/include/common.h index 9ec3a091d1..619e3532f0 100644 --- a/include/common.h +++ b/include/common.h @@ -355,6 +355,12 @@ namespace std { size_t operator()( const wxString& s ) const; }; + + template<> struct std::less + { + bool operator()( const wxPoint& aA, const wxPoint& aB ) const; + }; + } #endif