]> git.saurik.com Git - wxWidgets.git/commitdiff
use common bottleneck
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 15 Jun 2013 14:45:17 +0000 (14:45 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 15 Jun 2013 14:45:17 +0000 (14:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/numformatter.cpp

index 0c3a6a7a1ab6c5a1ea635fead91c94e870bbdc86..12de60e842ec82ef1457051a0eccb4e4530dcd77 100644 (file)
@@ -210,8 +210,7 @@ wxString wxNumberFormatter::ToString(wxLongLong_t val, int style)
 
 wxString wxNumberFormatter::ToString(double val, int precision, int style)
 {
 
 wxString wxNumberFormatter::ToString(double val, int precision, int style)
 {
-    const wxString fmt = wxString::Format("%%.%df", precision);
-    wxString s = wxString::Format(fmt, val);
+    wxString s = wxString::FromDouble(val,precision);
 
     if ( style & Style_WithThousandsSep )
         AddThousandsSeparators(s);
 
     if ( style & Style_WithThousandsSep )
         AddThousandsSeparators(s);