fix crash when calling wxGetEmptyString() with wxUSE_STL == 1 (bug 1028804)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,6 +55,8 @@
|
|||||||
#include "wx/buffer.h" // for wxCharBuffer
|
#include "wx/buffer.h" // for wxCharBuffer
|
||||||
#include "wx/strconv.h" // for wxConvertXXX() macros and wxMBConv classes
|
#include "wx/strconv.h" // for wxConvertXXX() macros and wxMBConv classes
|
||||||
|
|
||||||
|
class WXDLLIMPEXP_BASE wxString;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// macros
|
// macros
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -164,12 +166,11 @@ inline int Stricmp(const char *psz1, const char *psz2)
|
|||||||
#endif // OS/compiler
|
#endif // OS/compiler
|
||||||
}
|
}
|
||||||
|
|
||||||
// return an empty wxString
|
|
||||||
class WXDLLIMPEXP_BASE wxString; // not yet defined
|
|
||||||
inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; }
|
|
||||||
|
|
||||||
#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"
|
||||||
@@ -191,6 +192,9 @@ inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString;
|
|||||||
|
|
||||||
#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
|
||||||
|
Reference in New Issue
Block a user