diff --git a/include/wx/string.h b/include/wx/string.h index e05371a9e4..888a1faaf4 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -55,6 +55,8 @@ #include "wx/buffer.h" // for wxCharBuffer #include "wx/strconv.h" // for wxConvertXXX() macros and wxMBConv classes +class WXDLLIMPEXP_BASE wxString; + // --------------------------------------------------------------------------- // macros // --------------------------------------------------------------------------- @@ -164,12 +166,11 @@ inline int Stricmp(const char *psz1, const char *psz2) #endif // OS/compiler } -// return an empty wxString -class WXDLLIMPEXP_BASE wxString; // not yet defined -inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; } - #if wxUSE_STL +// return an empty wxString (doesn't make much sense with wxUSE_STL == 1) +inline const wxString wxGetEmptyString() { wxString(); } + #include "wx/beforestd.h" #include #include "wx/afterstd.h" @@ -191,6 +192,9 @@ inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; #else // if !wxUSE_STL +// return an empty wxString +inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; } + #ifndef HAVE_STD_STRING_COMPARE #define HAVE_STD_STRING_COMPARE #endif