]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 654877 ] Missing == != methods in wxRect2DInt
authorJulian Smart <julian@anthemion.co.uk>
Tue, 17 Dec 2002 23:02:24 +0000 (23:02 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 17 Dec 2002 23:02:24 +0000 (23:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/geometry.h

index b872f8a7fb7353b198afe8ff475fceae2ee0c883..80016c0a096a0fac7c6499b2093948d84fe0fdb4 100644 (file)
@@ -735,16 +735,16 @@ public:
                 m_width *= ((wxInt32)num)/((wxInt32)denum); m_height *= ((wxInt32)num)/((wxInt32)denum);}
 
        wxRect2DInt& operator = (const wxRect2DInt& rect);
-       bool operator == (const wxRect2DInt& rect);
-       bool operator != (const wxRect2DInt& rect);
+       bool operator == (const wxRect2DInt& rect) const;
+       bool operator != (const wxRect2DInt& rect) const;
 
-        void WriteTo( wxDataOutputStream &stream ) const;
-        void ReadFrom( wxDataInputStream &stream );
+       void WriteTo( wxDataOutputStream &stream ) const;
+       void ReadFrom( wxDataInputStream &stream );
 
        wxInt32 m_x;
-        wxInt32 m_y;
-        wxInt32 m_width;
-        wxInt32 m_height;
+       wxInt32 m_y;
+       wxInt32 m_width;
+       wxInt32 m_height;
 };
 
 inline wxRect2DInt::wxRect2DInt( const wxRect2DInt &r )
@@ -763,6 +763,17 @@ inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt &a , const wxPoint2DInt &b)
     m_height = abs( a.m_y - b.m_y );
 }
 
+inline bool wxRect2DInt::operator == (const wxRect2DInt& rect) const
+{ 
+    return (m_x==rect.m_x && m_y==rect.m_y && 
+            m_width==rect.m_width && m_height==rect.m_height);
+}
+
+inline bool wxRect2DInt::operator != (const wxRect2DInt& rect) const
+{
+    return !(*this == rect);
+}
+
 class wxTransform2D
 {
 public :