X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5e8b33639ce37dffc19505fd78ce74e1b465a4d..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/anystr.h diff --git a/include/wx/anystr.h b/include/wx/anystr.h index 029e5095cf..8eebaf9b03 100644 --- a/include/wx/anystr.h +++ b/include/wx/anystr.h @@ -3,7 +3,6 @@ // Purpose: wxAnyStrPtr class declaration // Author: Vadim Zeitlin // Created: 2009-03-23 -// RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -61,10 +60,9 @@ public: // different conversions to pointers) operator bool() const { return m_str != NULL; } -#ifdef __VISUALC6__ - // FIXME-VC6: it also needs this one or it complains about ambiguity + // at least VC6 and VC7 also need this one or they complain about ambiguity + // for !anystr expressions bool operator!() const { return !((bool)*this); } -#endif // __VISUALC6__ // and these are the conversions operator which allow to assign the result @@ -129,22 +127,13 @@ public: // already works fine. private: - // the original string and the offset in it we correspond to, if the string - // is NULL this object is NULL pointer-like + // the original string and the position in it we correspond to, if the + // string is NULL this object is NULL pointer-like const wxString * const m_str; const wxString::const_iterator m_iter; wxDECLARE_NO_ASSIGN_CLASS(wxAnyStrPtr); }; -// FIXME-VC6: expressions involving logical operations are not compiled -// correctly without these operators -#ifdef __VISUALC6__ - inline bool operator||(const wxAnyStrPtr& p, bool v) { return (bool)p || v; } - inline bool operator||(bool v, const wxAnyStrPtr& p) { return v || (bool)p; } - inline bool operator&&(const wxAnyStrPtr& p, bool v) { return (bool)p && v; } - inline bool operator&&(bool v, const wxAnyStrPtr& p) { return v && (bool)p; } -#endif // __VISUALC6__ - #endif // _WX_ANYSTR_H_