From 35f860fa231822295eced971ea27e3d017623c7c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 12 Apr 2008 17:10:47 +0000 Subject: [PATCH] don't use wxLocale if wxUSE_LOCALE==0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/xrc/xmlres.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index dfd48835d2..c69e3bb24b 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -995,6 +995,7 @@ float wxXmlResourceHandler::GetFloat(const wxString& param, float defaultv) { wxString str = GetParamValue(param); +#if wxUSE_LOCALE // strings in XRC always use C locale but wxString::ToDouble() uses the // current one, so transform the string to it supposing that the only // difference between them is the decimal separator @@ -1002,6 +1003,7 @@ float wxXmlResourceHandler::GetFloat(const wxString& param, float defaultv) // TODO: use wxString::ToCDouble() when we have it str.Replace(wxT("."), wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER)); +#endif // wxUSE_LOCALE double value; if (!str.ToDouble(&value)) -- 2.45.2