X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d4037aa1f081ee2273468aa6f6cc5918d5e7d14..2b9a7d4cc2f5f55df3d83f7cf2160cf9a509a4f2:/src/common/longlong.cpp diff --git a/src/common/longlong.cpp b/src/common/longlong.cpp index aa40465563..e3d6a56586 100644 --- a/src/common/longlong.cpp +++ b/src/common/longlong.cpp @@ -1092,24 +1092,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 ) \ - { \ - long digit = (ll % 10).ToLong(); \ - if ( neg ) \ - digit = -digit; \ - result.Prepend((wxChar)(_T('0') + digit)); \ - ll /= 10; \ + while ( ll != 0 ) \ + { \ + long digit = (ll % 10).ToLong(); \ + result.Prepend((wxChar)(_T('0') + digit)); \ + ll /= 10; \ + } \ } \ \ if ( result.empty() ) \