#include "wx/txtstrm.h"
#endif
-#if defined(__MWERKS__) && defined(__WXMSW__)
- #include <string.h> // for memset()
-#else
- #include <memory.h> // for memset()
-#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);
while ( ll != 0 ) \
{ \
long digit = (ll % 10).ToLong(); \
- result.Prepend((wxChar)(_T('0') - digit)); \
+ result.Prepend((wxChar)(wxT('0') - digit)); \
ll /= 10; \
} \
} \
while ( ll != 0 ) \
{ \
long digit = (ll % 10).ToLong(); \
- result.Prepend((wxChar)(_T('0') + digit)); \
+ result.Prepend((wxChar)(wxT('0') + digit)); \
ll /= 10; \
} \
} \
\
if ( result.empty() ) \
- result = _T('0'); \
+ result = wxT('0'); \
else if ( neg ) \
- result.Prepend(_T('-')); \
+ result.Prepend(wxT('-')); \
\
return result; \
}
\
while ( ll != 0 ) \
{ \
- result.Prepend((wxChar)(_T('0') + (ll % 10).ToULong())); \
+ result.Prepend((wxChar)(wxT('0') + (ll % 10).ToULong())); \
ll /= 10; \
} \
\
if ( result.empty() ) \
- result = _T('0'); \
+ result = wxT('0'); \
\
return result; \
}
return o << ll.ToString();
}
-#define READ_STRING_CHAR(s, idx, len) ((wxChar) ((idx!=len) ? s[idx++] : 0))
+#define READ_STRING_CHAR(s, idx, len) ((idx!=len) ? (wxChar)s[idx++] : wxT('\0'))
WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o, wxULongLong &ll)
{