1. wxLongLongWx::Assign(double) added (half implemented)

2. small wxDateTime bug fixed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-27 11:26:59 +00:00
parent d5fc46616d
commit 41acf5c0bd
6 changed files with 58 additions and 19 deletions

View File

@@ -30,6 +30,7 @@
#include "wx/longlong.h"
#include <memory.h> // for memset()
#include <math.h> // for fabs()
// ============================================================================
// implementation
@@ -80,8 +81,28 @@ ostream& operator<< (ostream& o, const wxLongLongNative& ll)
#endif // wxUSE_LONGLONG_NATIVE
// ============================================================================
// wxLongLongWx: emulation of 'long long' using 2 longs
// ============================================================================
#if wxUSE_LONGLONG_WX
// assignment
wxLongLongWx& wxLongLongWx::Assign(double d)
{
if ( fabs(d) <= LONG_MAX )
{
m_hi = d < 0 ? 1 << (8*sizeof(long) - 1) : 0l;
m_lo = (long)d;
}
else
{
wxFAIL_MSG(_T("TODO"));
}
return *this;
}
wxLongLongWx wxLongLongWx::operator<<(int shift) const
{
if (shift == 0)