]> git.saurik.com Git - wxWidgets.git/commitdiff
return const wxString& from wxFontMapper::GetDefaultConfigPath()
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 28 Jun 2007 18:57:36 +0000 (18:57 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 28 Jun 2007 18:57:36 +0000 (18:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/fontmap.h
src/common/fmapbase.cpp

index c8b5822ac72d9560b167c400677efc1a41312a1c..3d86a887ea7914b6d867aa2cfbd673baafbe85d6 100644 (file)
@@ -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
 
 
index e989e839f8b6724af42d23c9248e5080146ea688..15b742ba229707e6dc29f5bff79f53a85669298a 100644 (file)
@@ -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)