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
This commit is contained in:
parent
987814bb7c
commit
7f26fff6b4
@ -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<wxInt32>(pt.m_x * n) ,
|
||||
static_cast<wxInt32>(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<wxInt32>(pt.m_x * n) ,
|
||||
static_cast<wxInt32>(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<wxInt32>(pt.m_x / n) ,
|
||||
static_cast<wxInt32>(pt.m_y / n) );
|
||||
}
|
||||
|
||||
// wxPoint2Ds represent a point or a vector in a 2d coordinate system
|
||||
|
Loading…
Reference in New Issue
Block a user