Safe casts.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user