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

@@ -51,7 +51,7 @@ public:
static wxString MakeString(const int& v) { return wxString::Format(wxT("%d"), v); }
static wxString MakeString(const long& v) { return wxString::Format(wxT("%ld"), v); }
static wxString MakeString(const double& v) { return wxString::Format(wxT("%.2f"), (float) v); }
static wxString MakeString(const double& v) { return wxString::Format(wxS("%.2f"), v); }
static wxString MakeString(const wxString& s) { return s; }
static wxString MakeString(const wxColour& col) { return wxT("#") + ColourToHexString(col); }
@@ -101,7 +101,7 @@ public:
static void AddString(wxString& str, const int& v) { str << wxString::Format(wxT("%d"), v); }
static void AddString(wxString& str, const long& v) { str << wxString::Format(wxT("%ld"), v); }
static void AddString(wxString& str, const double& v) { str << wxString::Format(wxT("%.2f"), (float) v); }
static void AddString(wxString& str, const double& v) { str << wxString::Format(wxS("%.2f"), v); }
static void AddString(wxString& str, const wxChar* s) { str << s; }
static void AddString(wxString& str, const wxString& s) { str << s; }
static void AddString(wxString& str, const wxColour& col) { str << wxT("#") << ColourToHexString(col); }