Avoid -Wdouble-promotion warnings

This commit is contained in:
Paul Cornett
2020-10-14 11:07:55 -07:00
parent 97655e5b21
commit b5a554b9a6
44 changed files with 208 additions and 201 deletions

View File

@@ -691,11 +691,11 @@ bool wxRichTextFormattingDialog::ConvertFromString(const wxString& str, int& ret
}
else if (unit == wxTEXT_ATTR_UNITS_TENTHS_MM)
{
float value = 0.0;
float value = 0;
wxSscanf(str.c_str(), wxT("%f"), &value);
// Convert from cm
// Do this in two steps, since using one step causes strange rounding error for VS 2010 at least.
float v = (value * 100.0);
float v = value * 100;
ret = (int) (v);
return true;
}
@@ -706,9 +706,9 @@ bool wxRichTextFormattingDialog::ConvertFromString(const wxString& str, int& ret
}
else if (unit == wxTEXT_ATTR_UNITS_HUNDREDTHS_POINT)
{
float value = 0.0;
float value = 0;
wxSscanf(str.c_str(), wxT("%f"), &value);
float v = (value * 100.0);
float v = value * 100;
ret = (int) (v);
}
else if (unit == wxTEXT_ATTR_UNITS_POINTS)