From: Vadim Zeitlin Date: Fri, 22 Jun 2007 20:27:07 +0000 (+0000) Subject: remove #if around operator&&(), its needed for other compilers too (Sun CC 5.9) and... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8019a673052f9257fa31ae42a26f2920454093f7 remove #if around operator&&(), its needed for other compilers too (Sun CC 5.9) and doesnt seem to hurt the ones which do not need it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/unichar.h b/include/wx/unichar.h index f78e5806bc..f035f3892f 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -117,12 +117,10 @@ public: // operator unspecified_bool_type() would only makes the ambiguity worse.) operator bool() const { return m_value != 0; } bool operator!() const { return !((bool)*this); } -#if (defined(__VISUALC__) && __VISUALC__ < 1400) || \ - defined(__DIGITALMARS__) || defined(__BORLANDC__) - // We need this for VC++ < 8 or DigitalMars and expressions like - // "str[0] && *p": + + // And this one is needed by some (not all, but not using ifdefs makes the + // code easier) compilers to parse "str[0] && *p" successfully bool operator&&(bool v) const { return (bool)*this && v; } -#endif // Assignment operators: wxUniChar& operator=(const wxUniChar& c) { m_value = c.m_value; return *this; }