Avoid passing float argument for "%f" printf specifier
"%f" takes a double. Eliminates some -Wdouble-promotion warnings.
This commit is contained in:
@@ -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); }
|
||||
|
Reference in New Issue
Block a user