X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18680f86512504f043ad5d0b222afc7be87aa3e9..87eaa6f666513f6209b52ba765b48900fb3ed49f:/src/common/longlong.cpp diff --git a/src/common/longlong.cpp b/src/common/longlong.cpp index 360d087b3e..e951865bff 100644 --- a/src/common/longlong.cpp +++ b/src/common/longlong.cpp @@ -33,11 +33,7 @@ #include "wx/txtstrm.h" #endif -#if defined(__MWERKS__) && defined(__WXMSW__) - #include // for memset() -#else - #include // for memset() -#endif +#include // for memset() #include "wx/ioswrap.h" @@ -194,6 +190,19 @@ double wxLongLongWx::ToDouble() const return d; } +double wxULongLongWx::ToDouble() const +{ + unsigned double d = m_hi; + d *= 1.0 + (double)ULONG_MAX; + d += m_lo; + +#ifdef wxLONGLONG_TEST_MODE + wxASSERT( d == m_ll ); +#endif // wxLONGLONG_TEST_MODE + + return d; +} + wxLongLongWx wxLongLongWx::operator<<(int shift) const { wxLongLongWx ll(*this);