Avoid -Wdouble-promotion warnings
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user