X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..218e641ac2c38b4e81873d314ea3841b0314f5b8:/src/common/any.cpp diff --git a/src/common/any.cpp b/src/common/any.cpp index 0fa1368257..228f1770b3 100644 --- a/src/common/any.cpp +++ b/src/common/any.cpp @@ -152,7 +152,7 @@ bool wxConvertAnyToVariant(const wxAny& any, wxVariant* variant) if ( any.GetAs(&ll) ) { // NB: Do not use LONG_MAX here. Explicitly using 32-bit - // integer constraint yields more consistent behavior across + // integer constraint yields more consistent behaviour across // builds. if ( ll > wxINT32_MAX || ll < wxINT32_MIN ) *variant = wxLongLong(ll); @@ -374,7 +374,7 @@ bool wxAnyConvertString(const wxString& value, else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, double) ) { double value2; - if ( !value.ToDouble(&value2) ) + if ( !value.ToCDouble(&value2) ) return false; wxAnyValueTypeImplDouble::SetValue(value2, dst); } @@ -453,7 +453,7 @@ bool wxAnyValueTypeImplDouble::ConvertValue(const wxAnyValueBuffer& src, } else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) ) { - wxString s = wxString::Format(wxS("%.14g"), value); + wxString s = wxString::FromCDouble(value, 14); wxAnyValueTypeImpl::SetValue(s, dst); } else @@ -471,7 +471,10 @@ WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplwxString) WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplConstCharPtr) WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImplConstWchar_tPtr) +#if wxUSE_DATETIME WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) +#endif // wxUSE_DATETIME + //WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) //WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) @@ -481,7 +484,9 @@ WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) class wxAnyNullValue { -private: +protected: + // this field is unused, but can't be private to avoid Clang's + // "Private field 'm_dummy' is not used" warning void* m_dummy; }; @@ -513,6 +518,14 @@ public: return false; } +#if wxUSE_EXTENDED_RTTI + virtual const wxTypeInfo* GetTypeInfo() const + { + wxFAIL_MSG("Null Type Info not available"); + return NULL; + } +#endif + private: }; @@ -521,4 +534,7 @@ WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) wxAnyValueType* wxAnyNullValueType = wxAnyValueTypeImpl::GetInstance(); +#include "wx/listimpl.cpp" +WX_DEFINE_LIST(wxAnyList) + #endif // wxUSE_ANY