Avoid passing float argument for "%f" printf specifier

"%f" takes a double. Eliminates some -Wdouble-promotion warnings.
This commit is contained in:
Paul Cornett
2020-04-21 11:59:36 -07:00
parent 62372d4337
commit c5faf9cfac
10 changed files with 21 additions and 21 deletions

View File

@@ -2027,7 +2027,7 @@ public:
#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
// insert a float into string
wxString& operator<<(float f)
{ return (*this) << Format(wxT("%f"), f); }
{ return *this << static_cast<double>(f); }
// insert a double into string
wxString& operator<<(double d)
{ return (*this) << Format(wxT("%g"), d); }