Safe casts.

This commit is contained in:
Steve Checkoway
2006-09-03 05:53:53 +00:00
parent 72aa78003c
commit b791ce0c4c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ void ComboGraph::Load( const StageStats &s, const PlayerStageStats &pss )
if( !bIsMax )
continue;
BitmapText *pText = (BitmapText *) m_pMaxComboText->Copy(); // XXX Copy should be covariant
BitmapText *pText = dynamic_cast<BitmapText*>( m_pMaxComboText->Copy() ); // XXX Copy should be covariant
const float fStart = SCALE( combo.fStartSecond, fFirstSecond, fLastSecond, 0.0f, 1.0f );
const float fSize = SCALE( combo.fSizeSeconds, 0, fLastSecond-fFirstSecond, 0.0f, 1.0f );
+1 -1
View File
@@ -150,7 +150,7 @@ MusicWheelItem::~MusicWheelItem()
void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD )
{
const WheelItemData *pWID = (const WheelItemData *) pWIBD; // XXX: ugly cast
const WheelItemData *pWID = dynamic_cast<const WheelItemData*>( pWIBD ); // XXX: ugly cast
ASSERT( pWID != NULL );
data = pWID;