cs.Trim(FALSE);
// discard the optional quotes
- if ( !!cs )
+ if ( !cs.empty() )
{
if ( cs[0u] == _T('"') && cs.Last() == _T('"') )
{
cs.MakeUpper();
- if ( !cs || cs == wxT("US-ASCII") )
+ if ( cs.empty() || cs == _T("US-ASCII") )
{
encoding = wxFONTENCODING_DEFAULT;
}
// message
if ( encoding == wxFONTENCODING_SYSTEM )
{
- wxFatalError(_("can't load any font, aborting"));
+ wxLogFatalError(_("can't load any font, aborting"));
- // wxFatalError doesn't return
+ // wxLogFatalError doesn't return
}
wxString configEntry,
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++ )