X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/059a684d564804bb254088ebc39b7400268fef77..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/common/longlong.cpp?ds=sidebyside diff --git a/src/common/longlong.cpp b/src/common/longlong.cpp index 2e589fa723..9334dcc3f4 100644 --- a/src/common/longlong.cpp +++ b/src/common/longlong.cpp @@ -35,6 +35,8 @@ #include // for memset() #endif +#include "wx/ioswrap.h" + // ============================================================================ // implementation // ============================================================================ @@ -751,7 +753,7 @@ wxULongLongWx& wxULongLongWx::operator*=(const wxULongLongWx& ll) m_hi = m_lo = 0; #ifdef wxLONGLONG_TEST_MODE - unsigned wxLongLong_t llOld = m_ll; + wxULongLong_t llOld = m_ll; m_ll = 0; #endif // wxLONGLONG_TEST_MODE @@ -1092,21 +1094,24 @@ void *wxULongLongWx::asArray(void) const \ name ll = *this; \ \ - bool neg; \ - if ( ll < 0 ) \ + bool neg = ll < 0; \ + if ( neg ) \ { \ - ll.Negate(); \ - neg = true; \ + while ( ll != 0 ) \ + { \ + long digit = (ll % 10).ToLong(); \ + result.Prepend((wxChar)(_T('0') - digit)); \ + ll /= 10; \ + } \ } \ else \ { \ - neg = false; \ - } \ - \ - while ( ll != 0 ) \ - { \ - result.Prepend((wxChar)(_T('0') + (ll % 10).ToLong())); \ - ll /= 10; \ + while ( ll != 0 ) \ + { \ + long digit = (ll % 10).ToLong(); \ + result.Prepend((wxChar)(_T('0') + digit)); \ + ll /= 10; \ + } \ } \ \ if ( result.empty() ) \ @@ -1150,11 +1155,13 @@ void *wxULongLongWx::asArray(void) const #if wxUSE_STD_IOSTREAM // input/output +WXDLLIMPEXP_BASE wxSTD ostream& operator<< (wxSTD ostream& o, const wxLongLong& ll) { return o << ll.ToString(); } +WXDLLIMPEXP_BASE wxSTD ostream& operator<< (wxSTD ostream& o, const wxULongLong& ll) { return o << ll.ToString();