don't define comparison operators for wxString and wx[W]CharBuffer when wxUSE_STL == 1 neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c3d02b6843
commit
e51b17a1f9
@ -1433,14 +1433,6 @@ inline bool operator>=(const wxString& s1, const wxChar * s2)
|
|||||||
inline bool operator>=(const wxChar * s1, const wxString& s2)
|
inline bool operator>=(const wxChar * s1, const wxString& s2)
|
||||||
{ return s2.Cmp(s1) <= 0; }
|
{ return s2.Cmp(s1) <= 0; }
|
||||||
|
|
||||||
#endif // !wxUSE_STL
|
|
||||||
|
|
||||||
// comparison with char
|
|
||||||
inline bool operator==(wxChar c, const wxString& s) { return s.IsSameAs(c); }
|
|
||||||
inline bool operator==(const wxString& s, wxChar c) { return s.IsSameAs(c); }
|
|
||||||
inline bool operator!=(wxChar c, const wxString& s) { return !s.IsSameAs(c); }
|
|
||||||
inline bool operator!=(const wxString& s, wxChar c) { return !s.IsSameAs(c); }
|
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
inline bool operator==(const wxString& s1, const wxWCharBuffer& s2)
|
inline bool operator==(const wxString& s1, const wxWCharBuffer& s2)
|
||||||
{ return (s1.Cmp((const wchar_t *)s2) == 0); }
|
{ return (s1.Cmp((const wchar_t *)s2) == 0); }
|
||||||
@ -1461,16 +1453,12 @@ inline bool operator!=(const wxCharBuffer& s1, const wxString& s2)
|
|||||||
{ return (s2.Cmp((const char *)s1) != 0); }
|
{ return (s2.Cmp((const char *)s1) != 0); }
|
||||||
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
||||||
|
|
||||||
#if !wxUSE_STL
|
|
||||||
|
|
||||||
wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, const wxString& string2);
|
wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, const wxString& string2);
|
||||||
wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxChar ch);
|
wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxChar ch);
|
||||||
wxString WXDLLIMPEXP_BASE operator+(wxChar ch, const wxString& string);
|
wxString WXDLLIMPEXP_BASE operator+(wxChar ch, const wxString& string);
|
||||||
wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wxChar *psz);
|
wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wxChar *psz);
|
||||||
wxString WXDLLIMPEXP_BASE operator+(const wxChar *psz, const wxString& string);
|
wxString WXDLLIMPEXP_BASE operator+(const wxChar *psz, const wxString& string);
|
||||||
|
|
||||||
#endif // !wxUSE_STL
|
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
inline wxString operator+(const wxString& string, const wxWCharBuffer& buf)
|
inline wxString operator+(const wxString& string, const wxWCharBuffer& buf)
|
||||||
{ return string + (const wchar_t *)buf; }
|
{ return string + (const wchar_t *)buf; }
|
||||||
@ -1483,6 +1471,15 @@ inline wxString operator+(const wxCharBuffer& buf, const wxString& string)
|
|||||||
{ return (const char *)buf + string; }
|
{ return (const char *)buf + string; }
|
||||||
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
||||||
|
|
||||||
|
#endif // !wxUSE_STL
|
||||||
|
|
||||||
|
// comparison with char (those are not defined by std::[w]string and so should
|
||||||
|
// be always available)
|
||||||
|
inline bool operator==(wxChar c, const wxString& s) { return s.IsSameAs(c); }
|
||||||
|
inline bool operator==(const wxString& s, wxChar c) { return s.IsSameAs(c); }
|
||||||
|
inline bool operator!=(wxChar c, const wxString& s) { return !s.IsSameAs(c); }
|
||||||
|
inline bool operator!=(const wxString& s, wxChar c) { return !s.IsSameAs(c); }
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Implementation only from here until the end of file
|
// Implementation only from here until the end of file
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user