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:
Vadim Zeitlin
2001-09-19 16:47:23 +00:00
parent 11e82c1ba3
commit 297e4185cc

View File

@@ -397,7 +397,7 @@ public :
inline wxPoint2DInt( const wxPoint2DInt &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 GetRounded( wxInt32 *x , wxInt32 *y );
@@ -474,20 +474,20 @@ inline wxPoint2DInt::wxPoint2DInt( const wxPoint &pt )
inline void wxPoint2DInt::GetFloor( wxInt32 *x , wxInt32 *y )
{
// casts needed MIPSpro compiler under SGI
*x = (wxInt32) floor( (double)m_x );
*y = (wxInt32) floor( (double)m_y );
if ( x )
*x = m_x;
if ( y )
*y = m_y;
}
inline void wxPoint2DInt::GetRounded( wxInt32 *x , wxInt32 *y )
{
*x = (wxInt32) floor( m_x + 0.5 );
*y = (wxInt32) floor( m_y + 0.5);
GetFloor(x, y);
}
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) );
}