]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fmapbase.cpp
several g++ 4 warning fixes
[wxWidgets.git] / src / common / fmapbase.cpp
index 48e1b2e148bc9a5a4953d00371b4a505a6faa668..eb6fe9843f24f9373b919c645110bc0f0f2af149 100644 (file)
@@ -31,6 +31,7 @@
     #include "wx/log.h"
     #include "wx/intl.h"
     #include "wx/module.h"
+    #include "wx/wxcrtvararg.h"
 #endif //WX_PRECOMP
 
 #if defined(__WXMSW__)
@@ -98,10 +99,11 @@ static wxFontEncoding gs_encodings[] =
     wxFONTENCODING_BIG5,
     wxFONTENCODING_SHIFT_JIS,
     wxFONTENCODING_GB2312,
+    wxFONTENCODING_ISO2022_JP,
 };
 
 // the descriptions for them
-static const wxChar* gs_encodingDescs[] =
+static const char* gs_encodingDescs[] =
 {
     wxTRANSLATE( "Western European (ISO-8859-1)" ),
     wxTRANSLATE( "Central European (ISO-8859-2)" ),
@@ -152,6 +154,7 @@ static const wxChar* gs_encodingDescs[] =
     wxTRANSLATE( "BIG5" ),
     wxTRANSLATE( "SHIFT-JIS" ),
     wxTRANSLATE( "GB-2312" ),
+    wxTRANSLATE( "ISO-2022-JP" ),
 };
 
 // and the internal names (these are not translated on purpose!)
@@ -219,6 +222,7 @@ static const wxChar* gs_encodingNames[WXSIZEOF(gs_encodingDescs)][9] =
     { wxT( "BIG5" ), wxT("big5"), NULL },
     { wxT( "SJIS" ), wxT( "SHIFT-JIS" ), wxT( "SHIFT_JIS" ), NULL },
     { wxT( "GB2312" ), NULL },
+    { wxT( "ISO-2022-JP" ), NULL },
 };
 
 wxCOMPILE_TIME_ASSERT( WXSIZEOF(gs_encodingDescs) == WXSIZEOF(gs_encodings), EncodingsArraysNotInSync );
@@ -336,10 +340,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)