Improve handling of wxUSE_FONTMAP==0 case with wxMSW
wxEncodingToCodepage() can be used when wxUSE_FONTMAP==0 Also avoid unreachable code warning with MSVC when using whole program optimization
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "wx/dynload.h"
|
||||
#include "wx/scopeguard.h"
|
||||
#include "wx/filename.h"
|
||||
#include "wx/fontenc.h"
|
||||
|
||||
#include "wx/confbase.h" // for wxExpandEnvVars()
|
||||
|
||||
@@ -1466,9 +1467,6 @@ extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding)
|
||||
// looks up the vlaues in the registry and the new one which is more
|
||||
// politically correct and has more chances to work on other Windows versions
|
||||
// as well but the old version is still needed for !wxUSE_FONTMAP case
|
||||
#if wxUSE_FONTMAP
|
||||
|
||||
#include "wx/fontmap.h"
|
||||
|
||||
extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding)
|
||||
{
|
||||
@@ -1554,6 +1552,10 @@ extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding)
|
||||
return (long) ret;
|
||||
}
|
||||
|
||||
#if wxUSE_FONTMAP
|
||||
|
||||
#include "wx/fontmap.h"
|
||||
|
||||
extern long wxCharsetToCodepage(const char *name)
|
||||
{
|
||||
// first get the font encoding for this charset
|
||||
|
Reference in New Issue
Block a user