X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a4d2944e64d800134e26e36d7883b0914bc1f78d..f36b3a915e4543fbbd9c911724404b016972aabc:/include/wx/longlong.h diff --git a/include/wx/longlong.h b/include/wx/longlong.h index 366ba7270f..b6cc42b479 100644 --- a/include/wx/longlong.h +++ b/include/wx/longlong.h @@ -129,15 +129,19 @@ public: // assignment operators // from native 64 bit integer +#ifndef wxLongLongIsLong wxLongLongNative& operator=(wxLongLong_t ll) { m_ll = ll; return *this; } wxLongLongNative& operator=(wxULongLong_t ll) { m_ll = ll; return *this; } +#endif // !wxLongLongNative wxLongLongNative& operator=(const wxULongLongNative &ll); wxLongLongNative& operator=(int l) { m_ll = l; return *this; } wxLongLongNative& operator=(long l) { m_ll = l; return *this; } + wxLongLongNative& operator=(unsigned int l) + { m_ll = l; return *this; } wxLongLongNative& operator=(unsigned long l) { m_ll = l; return *this; } #if wxUSE_LONGLONG_WX @@ -363,14 +367,18 @@ public: // assignment operators // from native 64 bit integer +#ifndef wxLongLongIsLong wxULongLongNative& operator=(wxULongLong_t ll) { m_ll = ll; return *this; } wxULongLongNative& operator=(wxLongLong_t ll) { m_ll = ll; return *this; } +#endif // !wxLongLongNative wxULongLongNative& operator=(int l) { m_ll = l; return *this; } wxULongLongNative& operator=(long l) { m_ll = l; return *this; } + wxULongLongNative& operator=(unsigned int l) + { m_ll = l; return *this; } wxULongLongNative& operator=(unsigned long l) { m_ll = l; return *this; } wxULongLongNative& operator=(const wxLongLongNative &ll) @@ -402,6 +410,13 @@ public: return wx_truncate_cast(unsigned long, m_ll); } + // convert to double +#ifdef _MSC_VER + double ToDouble() const { return wx_truncate_cast(double, (__int64) m_ll); } +#else + double ToDouble() const { return wx_truncate_cast(double, m_ll); } +#endif + // operations // addition wxULongLongNative operator+(const wxULongLongNative& ll) const @@ -629,6 +644,12 @@ public: return *this; } + + wxLongLongWx& operator=(unsigned int l) + { + return operator=((unsigned long)l); + } + wxLongLongWx& operator=(const class wxULongLongWx &ll); // from double @@ -892,6 +913,9 @@ public: return (unsigned long)m_lo; } + // convert to double + double ToDouble() const; + // operations // addition wxULongLongWx operator+(const wxULongLongWx& ll) const;