Always use the decimal point, regardless of the current locale.
This completes the changes of r74019.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74054
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
GetEventObject() in all ports but the frame the menu was attached to in wxMSW.
Now all ports return the menu that was opened or closed as the event object.
+- wxAny now uses C locale format for the floating point numbers and not the
+ current locale one, i.e. decimal point is always used.
+
Changes in behaviour which may result in compilation errors
-----------------------------------------------------------
object in heap for large objects (i.e. ones with size more than
WX_ANY_VALUE_BUFFER_SIZE, which at the time of writing is 16 bytes).
+ @note When performing conversions between strings and floating point
+ numbers, the representation of numbers in C locale is always used.
+ I.e. @code wxAny("1.23").GetAs<double>() @endcode will always work,
+ even if the current locale uses comma as decimal separator.
+
@library{wxbase}
@category{data}
}
else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) )
{
- wxString s = wxString::Format(wxS("%.14g"), value);
+ wxString s = wxString::FromCDouble(value, 14);
wxAnyValueTypeImpl<wxString>::SetValue(s, dst);
}
else