From 67dd28619fc568fdfbe25ec68c103605c767b5c2 Mon Sep 17 00:00:00 2001 From: catalinr Date: Mon, 14 Oct 2019 22:20:37 +0300 Subject: [PATCH] Cast more int vars to double to avoid overflow warning --- include/wx/geometry.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wx/geometry.h b/include/wx/geometry.h index 513ff1385e..287a211da6 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -155,7 +155,8 @@ inline wxDouble wxPoint2DInt::GetDistance( const wxPoint2DInt &pt ) const inline wxDouble wxPoint2DInt::GetDistanceSquare( const wxPoint2DInt &pt ) const { - return ( (wxDouble)(pt.m_x-m_x)*(pt.m_x-m_x) + (wxDouble)(pt.m_y-m_y)*(pt.m_y-m_y) ); + return ( ((wxDouble)pt.m_x-m_x)*((wxDouble)pt.m_x-m_x) + + ((wxDouble)pt.m_y-m_y)*((wxDouble)pt.m_y-m_y) ); } inline wxInt32 wxPoint2DInt::GetDotProduct( const wxPoint2DInt &vec ) const