corrected the direction of comparisons between wxString and char/wxChar strings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-16 14:56:51 +00:00
parent 178d7ec235
commit 831faf970a
2 changed files with 12 additions and 4 deletions

View File

@@ -561,12 +561,20 @@ typedef int wxWindowID;
#define wxFOR_ALL_COMPARISONS_3(m, x, y, z) \
m(==,x,y,z) m(!=,x,y,z) m(>=,x,y,z) m(<=,x,y,z) m(>,x,y,z) m(<,x,y,z)
/*
This is only used with wxDEFINE_COMPARISON_REV: it passes both the normal
and the reversed comparison operators to the macro.
*/
#define wxFOR_ALL_COMPARISONS_3_REV(m, x, y, z) \
m(==,x,y,z,==) m(!=,x,y,z,!=) m(>=,x,y,z,<=) \
m(<=,x,y,z,>=) m(>,x,y,z,<) m(<,x,y,z,>)
#define wxDEFINE_COMPARISON(op, T1, T2, cmp) \
inline bool operator op(T1 x, T2 y) { return cmp(x, y, op); }
#define wxDEFINE_COMPARISON_REV(op, T1, T2, cmp) \
inline bool operator op(T2 y, T1 x) { return cmp(x, y, op); }
#define wxDEFINE_COMPARISON_REV(op, T1, T2, cmp, oprev) \
inline bool operator op(T2 y, T1 x) { return cmp(x, y, oprev); }
/*
Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given
@@ -586,7 +594,7 @@ typedef int wxWindowID;
*/
#define wxDEFINE_ALL_COMPARISONS(T1, T2, cmp) \
wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON, T1, T2, cmp) \
wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
wxFOR_ALL_COMPARISONS_3_REV(wxDEFINE_COMPARISON_REV, T1, T2, cmp)
/* ---------------------------------------------------------------------------- */
/* macros to avoid compiler warnings */