Fix compilation of generic wxNativeFontInfo::FromString()

There is no need to use ConvertFromLegacyWeightIfNecessary() here as the
string representation is not supposed to contain the legacy weight
constants. And it was also used incorrectly, resulting in build errors
for e.g. wxDFB.
This commit is contained in:
Vadim Zeitlin
2018-09-18 14:12:55 +02:00
parent b88d5e08ce
commit d355af3420

View File

@@ -776,9 +776,9 @@ bool wxNativeFontInfo::FromString(const wxString& s)
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )
return false;
weight = ConvertFromLegacyWeightIfNecessary(l);
if ( weight <= wxFONTWEIGHT_INVALID || weight > wxFONTWEIGHT_MAX )
if ( l <= wxFONTWEIGHT_INVALID || l > wxFONTWEIGHT_MAX )
return false;
weight = static_cast<int>(l);
token = tokenizer.GetNextToken();
if ( !token.ToLong(&l) )