// Name: wx/longlong.cpp
// Purpose: implementation of wxLongLongNative
// Author: Jeffrey C. Ollie <jeff@ollie.clive.ia.us>, Vadim Zeitlin
-// Remarks: this class is not public in wxWindows 2.0! It is intentionally
+// Remarks: this class is not public in wxWidgets 2.0! It is intentionally
// not documented and is for private use only.
// Modified by:
// Created: 10.02.99
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// headers
// ============================================================================
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "longlong.h"
#endif
bool wxLongLongWx::operator<(const wxLongLongWx& ll) const
{
if ( m_hi < ll.m_hi )
- return TRUE;
+ return true;
else if ( m_hi == ll.m_hi )
return m_lo < ll.m_lo;
else
- return FALSE;
+ return false;
}
bool wxULongLongWx::operator<(const wxULongLongWx& ll) const
{
if ( m_hi < ll.m_hi )
- return TRUE;
+ return true;
else if ( m_hi == ll.m_hi )
return m_lo < ll.m_lo;
else
- return FALSE;
+ return false;
}
bool wxLongLongWx::operator>(const wxLongLongWx& ll) const
{
if ( m_hi > ll.m_hi )
- return TRUE;
+ return true;
else if ( m_hi == ll.m_hi )
return m_lo > ll.m_lo;
else
- return FALSE;
+ return false;
}
bool wxULongLongWx::operator>(const wxULongLongWx& ll) const
{
if ( m_hi > ll.m_hi )
- return TRUE;
+ return true;
else if ( m_hi == ll.m_hi )
return m_lo > ll.m_lo;
else
- return FALSE;
+ return false;
}
// bitwise operators
//
// with 0 <= abs(remainder) < abs(divisor)
bool negRemainder = dividend.m_hi < 0;
- bool negQuotient = FALSE; // assume positive
+ bool negQuotient = false; // assume positive
if ( dividend.m_hi < 0 )
{
negQuotient = !negQuotient;
wxULongLongWx& wxULongLongWx::operator/=(const wxULongLongWx& ll)
{
- wxLongLongWx quotient, remainder;
+ wxULongLongWx quotient, remainder;
Divide(ll, quotient, remainder);
if ( ll < 0 )
{
ll.Negate();
- neg = TRUE;
+ neg = true;
}
else
{
- neg = FALSE;
+ neg = false;
}
while ( ll != 0 )
while ( ll != 0 )
{
- result.Prepend((wxChar)(_T('0') + (ll % 10).ToLong()));
+ result.Prepend((wxChar)(_T('0') + (ll % 10).ToULong()));
ll /= 10;
}