don't crash in wxGetEmptyString(): it's now a #define for wxString(), which is not any less efficient now

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-07-30 10:51:35 +00:00
parent 57c2270cd7
commit a0f63de941

View File

@@ -2689,16 +2689,7 @@ inline wxString operator+(wchar_t ch, const wxString& string)
{ return wxUniChar(ch) + string; } { return wxUniChar(ch) + string; }
#if wxUSE_STL_BASED_WXSTRING #define wxGetEmptyString() wxString()
// return an empty wxString (not very useful with wxUSE_STL == 1)
inline const wxString wxGetEmptyString() { return wxString(); }
#else // !wxUSE_STL_BASED_WXSTRING
// return an empty wxString (more efficient than wxString() here)
inline const wxString& wxGetEmptyString()
{
return *(wxString *)&wxEmptyString;
}
#endif // wxUSE_STL_BASED_WXSTRING/!wxUSE_STL_BASED_WXSTRING
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxStringBuffer: a tiny class allowing to get a writable pointer into string // wxStringBuffer: a tiny class allowing to get a writable pointer into string