X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3d49be8053a781a1aa3a720ac7803d99c1de84a..f2b7be7ad53d6147287ca97807774824167ddd0d:/src/common/fontmap.cpp diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 827577693b..3920675618 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -226,7 +226,7 @@ wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive) // remember the alt encoding for this charset -- or remember that // we don't know it - long value = n == -1 ? wxFONTENCODING_UNKNOWN : (long)encoding; + long value = n == -1 ? (long)wxFONTENCODING_UNKNOWN : (long)encoding; if ( !config->Write(charset, value) ) { wxLogError(_("Failed to remember the encoding for the charset '%s'."), charset.c_str()); @@ -262,6 +262,8 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry, { GetConfig()->Write(configEntry, info->ToString()); } +#else + wxUnusedVar(configEntry); #endif // wxUSE_CONFIG return true; } @@ -314,7 +316,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, wxString configEntry, encName = GetEncodingName(encoding); - if ( !!facename ) + if ( !facename.IsEmpty() ) { configEntry = facename + _T("_"); } @@ -338,13 +340,13 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, } else // use the info entered the last time { - if ( !!fontinfo && !!facename ) + if ( !fontinfo.IsEmpty() && !facename.IsEmpty() ) { // we tried to find a match with facename -- now try without it fontinfo = GetConfig()->Read(encName); } - if ( !!fontinfo ) + if ( !fontinfo.IsEmpty() ) { if ( info->FromString(fontinfo) ) { @@ -468,6 +470,8 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, } } //else: we're in non-interactive mode +#else + wxUnusedVar(equivEncoding); #endif // wxUSE_FONTDLG return foundEquivEncoding;