better fix for MIPSpro warnings: removed unneeded calls to floor()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -397,7 +397,7 @@ public :
|
|||||||
inline wxPoint2DInt( const wxPoint2DInt &pt );
|
inline wxPoint2DInt( const wxPoint2DInt &pt );
|
||||||
inline wxPoint2DInt( const wxPoint &pt );
|
inline wxPoint2DInt( const wxPoint &pt );
|
||||||
|
|
||||||
// two different conversions to integers, floor and rounding
|
// noops for this class, just return the coords
|
||||||
inline void GetFloor( wxInt32 *x , wxInt32 *y );
|
inline void GetFloor( wxInt32 *x , wxInt32 *y );
|
||||||
inline void GetRounded( wxInt32 *x , wxInt32 *y );
|
inline void GetRounded( wxInt32 *x , wxInt32 *y );
|
||||||
|
|
||||||
@@ -474,20 +474,20 @@ inline wxPoint2DInt::wxPoint2DInt( const wxPoint &pt )
|
|||||||
|
|
||||||
inline void wxPoint2DInt::GetFloor( wxInt32 *x , wxInt32 *y )
|
inline void wxPoint2DInt::GetFloor( wxInt32 *x , wxInt32 *y )
|
||||||
{
|
{
|
||||||
// casts needed MIPSpro compiler under SGI
|
if ( x )
|
||||||
*x = (wxInt32) floor( (double)m_x );
|
*x = m_x;
|
||||||
*y = (wxInt32) floor( (double)m_y );
|
if ( y )
|
||||||
|
*y = m_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void wxPoint2DInt::GetRounded( wxInt32 *x , wxInt32 *y )
|
inline void wxPoint2DInt::GetRounded( wxInt32 *x , wxInt32 *y )
|
||||||
{
|
{
|
||||||
*x = (wxInt32) floor( m_x + 0.5 );
|
GetFloor(x, y);
|
||||||
*y = (wxInt32) floor( m_y + 0.5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxDouble wxPoint2DInt::GetVectorLength()
|
inline wxDouble wxPoint2DInt::GetVectorLength()
|
||||||
{
|
{
|
||||||
// casts needed MIPSpro compiler under SGI
|
// cast needed MIPSpro compiler under SGI
|
||||||
return sqrt( (double)(m_x)*(m_x) + (m_y)*(m_y) );
|
return sqrt( (double)(m_x)*(m_x) + (m_y)*(m_y) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user