blind fix for wxGetEmptyString() compilation with wxUSE_STL == 1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -168,9 +168,6 @@ inline int Stricmp(const char *psz1, const char *psz2)
|
|||||||
|
|
||||||
#if wxUSE_STL
|
#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 "wx/beforestd.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "wx/afterstd.h"
|
#include "wx/afterstd.h"
|
||||||
@@ -192,9 +189,6 @@ inline const wxString wxGetEmptyString() { wxString(); }
|
|||||||
|
|
||||||
#else // if !wxUSE_STL
|
#else // if !wxUSE_STL
|
||||||
|
|
||||||
// return an empty wxString
|
|
||||||
inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; }
|
|
||||||
|
|
||||||
#ifndef HAVE_STD_STRING_COMPARE
|
#ifndef HAVE_STD_STRING_COMPARE
|
||||||
#define HAVE_STD_STRING_COMPARE
|
#define HAVE_STD_STRING_COMPARE
|
||||||
#endif
|
#endif
|
||||||
@@ -1291,6 +1285,17 @@ public:
|
|||||||
#include "wx/arrstr.h"
|
#include "wx/arrstr.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_STL
|
||||||
|
// return an empty wxString (not very useful with wxUSE_STL == 1)
|
||||||
|
inline const wxString wxGetEmptyString() { wxString(); }
|
||||||
|
#else // !wxUSE_STL
|
||||||
|
// return an empty wxString (more efficient than wxString() here)
|
||||||
|
inline const wxString& wxGetEmptyString()
|
||||||
|
{
|
||||||
|
return *(wxString *)&wxEmptyString;
|
||||||
|
}
|
||||||
|
#endif // wxUSE_STL/!wxUSE_STL
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxStringBuffer: a tiny class allowing to get a writable pointer into string
|
// wxStringBuffer: a tiny class allowing to get a writable pointer into string
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user