Browse Source

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

pull/6/merge
jean-pierre charras 8 years ago
parent
commit
e57435c0fc
  1. 2
      common/common.cpp
  2. 9
      include/common.h

2
common/common.cpp

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

9
include/common.h

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