]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxRect2DDouble == != = operators (patch 684616)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Mar 2003 23:44:56 +0000 (23:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Mar 2003 23:44:56 +0000 (23:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/geometry.h
src/common/geometry.cpp

index 8a7e9323c890600c133b5a516928bd8eb752078c..3e18b6b02557993c33dc090e7b9fe4455030a609 100644 (file)
@@ -634,11 +634,11 @@ public:
         { m_x *= ((wxDouble)num)/((wxDouble)denum); m_y *= ((wxDouble)num)/((wxDouble)denum);
                 m_width *= ((wxDouble)num)/((wxDouble)denum); m_height *= ((wxDouble)num)/((wxDouble)denum);}
 
-/*
     wxRect2DDouble& operator = (const wxRect2DDouble& rect);
-    bool operator == (const wxRect2DDouble& rect);
-    bool operator != (const wxRect2DDouble& rect);
-*/
+    inline bool operator == (const wxRect2DDouble& rect)
+        { return (m_x==rect.m_x && m_y==rect.m_y && m_width==rect.m_width && m_height==rect.m_height); }
+    inline bool operator != (const wxRect2DDouble& rect)
+        { return !(*this == rect); }
 
     wxDouble  m_x;
     wxDouble  m_y;
index 6c171e73a544bc7eaf16f6a17c3b564c840e256e..a01c529651028b464243e02b97d14aff972bc464 100644 (file)
@@ -145,6 +145,15 @@ void wxRect2DDouble::ConstrainTo( const wxRect2DDouble &rect )
         SetTop( rect.GetTop() );
 }
 
+wxRect2DDouble& wxRect2DDouble::operator=( const wxRect2DDouble &r )
+{
+    m_x = r.m_x;
+    m_y = r.m_y;
+    m_width = r.m_width;
+    m_height = r.m_height;
+    return *this;
+}
+
 // integer version
 
 // for the following calculations always remember