]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/longlong.h
fix printf() argument type in GetOsInfo()
[wxWidgets.git] / include / wx / longlong.h
index 69b6c4ca477154ab70877313b1b783fd9661a3bd..9b6553ea9a22eaaf282fb0b8b1921bc33400dd2d 100644 (file)
@@ -129,13 +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
@@ -361,12 +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)
@@ -398,6 +410,9 @@ public:
         return wx_truncate_cast(unsigned long, m_ll);
     }
 
+        // convert to double
+    double ToDouble() const { return wx_truncate_cast(double, m_ll); }
+
     // operations
         // addition
     wxULongLongNative operator+(const wxULongLongNative& ll) const
@@ -606,6 +621,12 @@ public:
 
         return *this;
     }
+        // from int
+    wxLongLongWx& operator=(int l)
+    {
+        return operator=((long)l);
+    }
+
     wxLongLongWx& operator=(unsigned long l)
     {
         m_lo = l;
@@ -619,6 +640,12 @@ public:
 
         return *this;
     }
+
+    wxLongLongWx& operator=(unsigned int l)
+    {
+        return operator=((unsigned long)l);
+    }
+
     wxLongLongWx& operator=(const class wxULongLongWx &ll);
 
     // from double
@@ -882,6 +909,9 @@ public:
         return (unsigned long)m_lo;
     }
 
+        // convert to double
+    double ToDouble() const;
+
     // operations
         // addition
     wxULongLongWx operator+(const wxULongLongWx& ll) const;