From: Václav Slavík Date: Thu, 28 Jun 2007 18:57:36 +0000 (+0000) Subject: return const wxString& from wxFontMapper::GetDefaultConfigPath() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/75ce4cb180dfbe5f6ee1ad6927929b43d04edcd1?ds=inline return const wxString& from wxFontMapper::GetDefaultConfigPath() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/fontmap.h b/include/wx/fontmap.h index c8b5822ac7..3d86a887ea 100644 --- a/include/wx/fontmap.h +++ b/include/wx/fontmap.h @@ -122,7 +122,7 @@ public: void SetConfigPath(const wxString& prefix); // return default config path - static const wxChar *GetDefaultConfigPath(); + static const wxString& GetDefaultConfigPath(); #endif // wxUSE_CONFIG diff --git a/src/common/fmapbase.cpp b/src/common/fmapbase.cpp index e989e839f8..15b742ba22 100644 --- a/src/common/fmapbase.cpp +++ b/src/common/fmapbase.cpp @@ -337,10 +337,15 @@ void wxFontMapperBase::Reset() // config usage customisation // ---------------------------------------------------------------------------- + +static wxString gs_defaultConfigPath(FONTMAPPER_ROOT_PATH); + /* static */ -const wxChar *wxFontMapperBase::GetDefaultConfigPath() +const wxString& wxFontMapperBase::GetDefaultConfigPath() { - return FONTMAPPER_ROOT_PATH; + // NB: we return const wxString& and not wxString for compatibility + // with 2.8 that returned const wxChar* + return gs_defaultConfigPath; } void wxFontMapperBase::SetConfigPath(const wxString& prefix)