Float to int is slow on ppc. It requires a store, a big stall, and then a load. It's even worse on a G5 if the compiler is dumb (and let's face it, I'm using gcc here...). Just use lroundf when we want an int. It will certainly be no slower.
This commit is contained in:
@@ -704,9 +704,9 @@ void OptionRow::GetWidthXY( PlayerNumber pn, int iChoiceOnRow, int &iWidthOut, i
|
||||
{
|
||||
const BitmapText &text = GetTextItemForRow( pn, iChoiceOnRow );
|
||||
|
||||
iWidthOut = int(roundf( text.GetZoomedWidth() ));
|
||||
iXOut = int(roundf( text.GetDestX() ));
|
||||
iYOut = int( roundf(m_Frame.GetDestY()) );
|
||||
iWidthOut = lroundf( text.GetZoomedWidth() );
|
||||
iXOut = lroundf( text.GetDestX() );
|
||||
iYOut = lroundf( m_Frame.GetDestY() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user