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