]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textcmn.cpp
Minor clarification
[wxWidgets.git] / src / common / textcmn.cpp
index c69ba3aea19ae1b29dfefeac3d2f926f058706ae..8bc1d2775432aef5908122e6b8a93a9a1547fe0a 100644 (file)
@@ -772,41 +772,19 @@ wxTextCtrl& wxTextCtrlBase::operator<<(const wxString& s)
     return *TEXTCTRL(this);
 }
 
-wxTextCtrl& wxTextCtrlBase::operator<<(float f)
-{
-    wxString str;
-    str.Printf(wxT("%.2f"), f);
-    AppendText(str);
-    return *TEXTCTRL(this);
-}
-
 wxTextCtrl& wxTextCtrlBase::operator<<(double d)
 {
-    wxString str;
-    str.Printf(wxT("%.2f"), d);
-    AppendText(str);
-    return *TEXTCTRL(this);
+    return *this << wxString::Format("%.2f", d);
 }
 
 wxTextCtrl& wxTextCtrlBase::operator<<(int i)
 {
-    wxString str;
-    str.Printf(wxT("%d"), i);
-    AppendText(str);
-    return *TEXTCTRL(this);
-}
-
-wxTextCtrl& wxTextCtrlBase::operator<<(long i)
-{
-    wxString str;
-    str.Printf(wxT("%ld"), i);
-    AppendText(str);
-    return *TEXTCTRL(this);
+    return *this << wxString::Format("%d", i);
 }
 
-wxTextCtrl& wxTextCtrlBase::operator<<(const wxChar c)
+wxTextCtrl& wxTextCtrlBase::operator<<(long l)
 {
-    return operator<<(wxString(c));
+    return *this << wxString::Format("%ld", l);
 }
 
 // ----------------------------------------------------------------------------