From: Julian Smart Date: Tue, 17 Dec 2002 23:02:24 +0000 (+0000) Subject: Applied patch [ 654877 ] Missing == != methods in wxRect2DInt X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cd501207cfda493fe6d3043e266e280d570c0282 Applied patch [ 654877 ] Missing == != methods in wxRect2DInt git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/geometry.h b/include/wx/geometry.h index b872f8a7fb..80016c0a09 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -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 :