Fix compil issue (created by commit "Added std::less specialization for wxPoint") with wxWidgets 3.1.1

This commit is contained in:
jean-pierre charras 2018-04-13 11:06:46 +02:00
parent 1663627135
commit e57435c0fc
2 changed files with 9 additions and 2 deletions

View File

@ -388,6 +388,7 @@ size_t std::hash<wxString>::operator()( const wxString& s ) const
#endif
#ifdef USE_KICAD_WXPOINT_LESS
bool std::less<wxPoint>::operator()( const wxPoint& aA, const wxPoint& aB ) const
{
if( aA.x == aB.x )
@ -395,3 +396,4 @@ bool std::less<wxPoint>::operator()( const wxPoint& aA, const wxPoint& aB ) cons
return aA.x < aB.x;
}
#endif

View File

@ -355,13 +355,18 @@ namespace std
{
size_t operator()( const wxString& s ) const;
};
}
#endif
/// Required to use wxPoint as key type in maps
#define USE_KICAD_WXPOINT_LESS // for common.cpp
namespace std
{
template<> struct less<wxPoint>
{
bool operator()( const wxPoint& aA, const wxPoint& aB ) const;
};
}
#endif
#endif // INCLUDE__COMMON_H_