changed wxLongLongNative(hi, lo) ctor to take wxInt32, not long, as it was completely broken on LP64 architectures otherwise
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -113,9 +113,9 @@ public:
|
|||||||
// from long long
|
// from long long
|
||||||
wxLongLongNative(wxLongLong_t ll) : m_ll(ll) { }
|
wxLongLongNative(wxLongLong_t ll) : m_ll(ll) { }
|
||||||
// from 2 longs
|
// from 2 longs
|
||||||
wxLongLongNative(long hi, unsigned long lo) : m_ll(0)
|
wxLongLongNative(wxInt32 hi, wxUint32 lo)
|
||||||
{
|
{
|
||||||
// assign first to avoid precision loss!
|
// cast to wxLongLong_t first to avoid precision loss!
|
||||||
m_ll = ((wxLongLong_t) hi) << 32;
|
m_ll = ((wxLongLong_t) hi) << 32;
|
||||||
m_ll |= (wxLongLong_t) lo;
|
m_ll |= (wxLongLong_t) lo;
|
||||||
}
|
}
|
||||||
@@ -160,11 +160,11 @@ public:
|
|||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
// get high part
|
// get high part
|
||||||
long GetHi() const
|
wxInt32 GetHi() const
|
||||||
{ return wx_truncate_cast(long, m_ll >> 32); }
|
{ return wx_truncate_cast(wxInt32, m_ll >> 32); }
|
||||||
// get low part
|
// get low part
|
||||||
unsigned long GetLo() const
|
wxUint32 GetLo() const
|
||||||
{ return wx_truncate_cast(unsigned long, m_ll); }
|
{ return wx_truncate_cast(wxUint32, m_ll); }
|
||||||
|
|
||||||
// get absolute value
|
// get absolute value
|
||||||
wxLongLongNative Abs() const { return wxLongLongNative(*this).Abs(); }
|
wxLongLongNative Abs() const { return wxLongLongNative(*this).Abs(); }
|
||||||
@@ -350,9 +350,9 @@ public:
|
|||||||
// from long long
|
// from long long
|
||||||
wxULongLongNative(wxULongLong_t ll) : m_ll(ll) { }
|
wxULongLongNative(wxULongLong_t ll) : m_ll(ll) { }
|
||||||
// from 2 longs
|
// from 2 longs
|
||||||
wxULongLongNative(unsigned long hi, unsigned long lo) : m_ll(0)
|
wxULongLongNative(wxUint32 hi, wxUint32 lo) : m_ll(0)
|
||||||
{
|
{
|
||||||
// assign first to avoid precision loss!
|
// cast to wxLongLong_t first to avoid precision loss!
|
||||||
m_ll = ((wxULongLong_t) hi) << 32;
|
m_ll = ((wxULongLong_t) hi) << 32;
|
||||||
m_ll |= (wxULongLong_t) lo;
|
m_ll |= (wxULongLong_t) lo;
|
||||||
}
|
}
|
||||||
@@ -392,11 +392,11 @@ public:
|
|||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
// get high part
|
// get high part
|
||||||
unsigned long GetHi() const
|
wxUint32 GetHi() const
|
||||||
{ return wx_truncate_cast(unsigned long, m_ll >> 32); }
|
{ return wx_truncate_cast(wxUint32, m_ll >> 32); }
|
||||||
// get low part
|
// get low part
|
||||||
unsigned long GetLo() const
|
wxUint32 GetLo() const
|
||||||
{ return wx_truncate_cast(unsigned long, m_ll); }
|
{ return wx_truncate_cast(wxUint32, m_ll); }
|
||||||
|
|
||||||
// convert to native ulong long
|
// convert to native ulong long
|
||||||
wxULongLong_t GetValue() const { return m_ll; }
|
wxULongLong_t GetValue() const { return m_ll; }
|
||||||
|
Reference in New Issue
Block a user