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:
@@ -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) )
|
||||
|
Reference in New Issue
Block a user