From 7f26fff6b4316e3d14695701a033c704a9dee2de Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Sat, 17 May 2014 21:29:49 +0000 Subject: [PATCH] Cast arguments passed to wxPoint2DInt constructor. Cast them to wxInt32 (instead of int) as that is the type of the wxPoint2DInt members m_x and m_y. See #10946. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/geometry.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/wx/geometry.h b/include/wx/geometry.h index 4aa5b1c1ac..f60f88531b 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -247,7 +247,8 @@ inline wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt) inline wxPoint2DInt operator*(wxDouble n , const wxPoint2DInt& pt) { - return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) ); + return wxPoint2DInt( static_cast(pt.m_x * n) , + static_cast(pt.m_y * n) ); } inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n) @@ -257,7 +258,8 @@ inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxInt32 n) inline wxPoint2DInt operator*(const wxPoint2DInt& pt , wxDouble n) { - return wxPoint2DInt( (int) (pt.m_x * n) , (int) (pt.m_y * n) ); + return wxPoint2DInt( static_cast(pt.m_x * n) , + static_cast(pt.m_y * n) ); } inline wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) @@ -272,7 +274,8 @@ inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n) inline wxPoint2DInt operator/(const wxPoint2DInt& pt , wxDouble n) { - return wxPoint2DInt( (int) (pt.m_x / n) , (int) (pt.m_y / n) ); + return wxPoint2DInt( static_cast(pt.m_x / n) , + static_cast(pt.m_y / n) ); } // wxPoint2Ds represent a point or a vector in a 2d coordinate system