/////////////////////////////////////////////////////////////////////////////
-// Name: wx/longlong.cpp
+// Name: src/common/longlong.cpp
// Purpose: implementation of wxLongLongNative
// Author: Jeffrey C. Ollie <jeff@ollie.clive.ia.us>, Vadim Zeitlin
// Remarks: this class is not public in wxWidgets 2.0! It is intentionally
#endif
#if wxUSE_LONGLONG
+
#include "wx/longlong.h"
-#include "wx/math.h" // for fabs()
-#if wxUSE_STREAMS
-#include "wx/txtstrm.h"
+#ifndef WX_PRECOMP
+ #include "wx/math.h" // for fabs()
#endif
-#if defined(__MWERKS__) && defined(__WXMSW__)
-#include <string.h> // for memset()
-#else
-#include <memory.h> // for memset()
+#if wxUSE_STREAMS
+ #include "wx/txtstrm.h"
#endif
+#include <string.h> // for memset()
+
#include "wx/ioswrap.h"
// ============================================================================
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);
wxString s = o.ReadWord();
ll = wxULongLong(0l, 0l);
- size_t length = s.Length();
+ size_t length = s.length();
size_t idx = 0;
wxChar ch = READ_STRING_CHAR(s, idx, length);
wxString s = o.ReadWord();
ll = wxLongLong(0l, 0l);
- size_t length = s.Length();
+ size_t length = s.length();
size_t idx = 0;
wxChar ch = READ_STRING_CHAR(s, idx, length);