X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a989c8afe4681b3ccadfc8054aff0448a6c7a94..807d848702772c7dc59e7a2bb35b2971ad86a64d:/src/common/fontmap.cpp diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index c93277a60d..6ab97b4c2f 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -479,7 +479,7 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, cs.Trim(FALSE); // discard the optional quotes - if ( !!cs ) + if ( !cs.empty() ) { if ( cs[0u] == _T('"') && cs.Last() == _T('"') ) { @@ -489,7 +489,7 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset, cs.MakeUpper(); - if ( !cs || cs == wxT("US-ASCII") ) + if ( cs.empty() || cs == _T("US-ASCII") ) { encoding = wxFONTENCODING_DEFAULT; } @@ -810,7 +810,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, wxFontEncodingArray equiv = wxEncodingConverter::GetAllEquivalents(encoding); size_t count = equiv.GetCount(); bool foundEquivEncoding = FALSE; - wxFontEncoding equivEncoding; + wxFontEncoding equivEncoding = wxFONTENCODING_SYSTEM; if ( count ) { for ( size_t i = 0; i < count && !foundEquivEncoding; i++ )