// accessors
// get high part
long GetHi() const
- { return (long)(m_ll >> 32); }
+ { return wx_truncate_cast(long, m_ll >> 32); }
// get low part
unsigned long GetLo() const
- { return (unsigned long)m_ll; }
+ { return wx_truncate_cast(unsigned long, m_ll); }
// get absolute value
wxLongLongNative Abs() const { return wxLongLongNative(*this).Abs(); }
wxASSERT_MSG( (m_ll >= LONG_MIN) && (m_ll <= LONG_MAX),
_T("wxLongLong to long conversion loss of precision") );
- return (long)m_ll;
+ return wx_truncate_cast(long, m_ll);
}
-#if wxABI_VERSION >= 20602
// convert to double
- double ToDouble() const { return m_ll; }
-#endif // ABI >= 2.6.2
+ double ToDouble() const { return wx_truncate_cast(double, m_ll); }
// don't provide implicit conversion to wxLongLong_t or we will have an
// ambiguity for all arithmetic operations
// accessors
// get high part
unsigned long GetHi() const
- { return (unsigned long)(m_ll >> 32); }
+ { return wx_truncate_cast(unsigned long, m_ll >> 32); }
// get low part
unsigned long GetLo() const
- { return (unsigned long)m_ll; }
+ { return wx_truncate_cast(unsigned long, m_ll); }
// convert to native ulong long
wxULongLong_t GetValue() const { return m_ll; }
wxASSERT_MSG( m_ll <= LONG_MAX,
_T("wxULongLong to long conversion loss of precision") );
- return (unsigned long)m_ll;
+ return wx_truncate_cast(unsigned long, m_ll);
}
// operations
return (long)m_lo;
}
-#if wxABI_VERSION >= 20602
// convert to double
double ToDouble() const;
-#endif // ABI >= 2.6.2
// operations
// addition