diff --git a/include/wx/geometry.h b/include/wx/geometry.h index 8a7e9323c8..3e18b6b025 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -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; diff --git a/src/common/geometry.cpp b/src/common/geometry.cpp index 6c171e73a5..a01c529651 100644 --- a/src/common/geometry.cpp +++ b/src/common/geometry.cpp @@ -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