From 47561b0dc572e82f9b01b881a12202b1a8542163 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sun, 10 Apr 2005 14:57:09 +0000 Subject: [PATCH] Check for wxUSE_STD_STRING with #if not with #ifdef, because it is always defined. Do not unconditionally #define HAVE_STD_STRING_COMPARE if it is not defined, because this nullifies the configure test. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/string.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/wx/string.h b/include/wx/string.h index 94dc733c6c..f55ac3032b 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -164,7 +164,7 @@ inline int Stricmp(const char *psz1, const char *psz2) // ---------------------------------------------------------------------------- // in both cases we need to define wxStdString -#if wxUSE_STL || defined(wxUSE_STD_STRING) +#if wxUSE_STL || wxUSE_STD_STRING #include "wx/beforestd.h" #include @@ -196,7 +196,8 @@ inline int Stricmp(const char *psz1, const char *psz2) typedef wxStdString wxStringBase; #else // if !wxUSE_STL -#ifndef HAVE_STD_STRING_COMPARE +#if !defined(HAVE_STD_STRING_COMPARE) && \ + (!defined(__WX_SETUP_H__) || wxUSE_STL == 0) #define HAVE_STD_STRING_COMPARE #endif @@ -657,7 +658,7 @@ public: // unconditionally add this ctor as it would make wx lib dependent on // libstdc++ on some Linux versions which is bad, so instead we ask the // client code to define this wxUSE_STD_STRING symbol if they need it -#ifdef wxUSE_STD_STRING +#if wxUSE_STD_STRING wxString(const wxStdString& s) : wxStringBase(s.c_str()) { } #endif // wxUSE_STD_STRING @@ -1184,7 +1185,7 @@ public: { return (wxString&)wxStringBase::assign(first, last); } // string comparison -#ifndef HAVE_STD_STRING_COMPARE +#if !defined(HAVE_STD_STRING_COMPARE) int compare(const wxStringBase& str) const; // comparison with a substring int compare(size_t nStart, size_t nLen, const wxStringBase& str) const; -- 2.45.2