From 987814bb7c7457ed4a09ddfca881b357a8a76ce3 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Sat, 17 May 2014 21:26:42 +0000 Subject: [PATCH] Fix wxPoint2DInt::operator*= and wxPoint2DInt::operator/= . These operator functions are respectively adding and subtracting their arguments. Instead let the functions multiply and divide their arguments (like their wxPoint2DDouble counterparts were doing already). See #10946. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/geometry.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/geometry.h b/include/wx/geometry.h index 37d3a74539..4aa5b1c1ac 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -202,15 +202,15 @@ inline wxPoint2DInt& wxPoint2DInt::operator-=(const wxPoint2DInt& pt) inline wxPoint2DInt& wxPoint2DInt::operator*=(const wxPoint2DInt& pt) { - m_x = m_x + pt.m_x; - m_y = m_y + pt.m_y; + m_x = m_x * pt.m_x; + m_y = m_y * pt.m_y; return *this; } inline wxPoint2DInt& wxPoint2DInt::operator/=(const wxPoint2DInt& pt) { - m_x = m_x - pt.m_x; - m_y = m_y - pt.m_y; + m_x = m_x / pt.m_x; + m_y = m_y / pt.m_y; return *this; }