Added std::less specialization for wxPoint
Requried to use wxPoint as key type in maps
This commit is contained in:
parent
f42ca89bb4
commit
b766dbc7a4
|
@ -386,3 +386,12 @@ size_t std::hash<wxString>::operator()( const wxString& s ) const
|
|||
return std::hash<std::wstring>{}( s.ToStdWstring() );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool std::less<wxPoint>::operator()( const wxPoint& aA, const wxPoint& aB ) const
|
||||
{
|
||||
if( aA.x == aB.x )
|
||||
return aA.y < aB.y;
|
||||
|
||||
return aA.x < aB.x;
|
||||
}
|
||||
|
|
|
@ -355,6 +355,12 @@ namespace std
|
|||
{
|
||||
size_t operator()( const wxString& s ) const;
|
||||
};
|
||||
|
||||
template<> struct std::less<wxPoint>
|
||||
{
|
||||
bool operator()( const wxPoint& aA, const wxPoint& aB ) const;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue