add asserts

This commit is contained in:
Chris Danford
2005-01-31 04:41:25 +00:00
parent ace7d6991c
commit bc6d223db5
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -35,7 +35,9 @@ ScoreKeeperMAX2::ScoreKeeperMAX2(
for( unsigned i=0; i<apSteps.size(); i++ ) for( unsigned i=0; i<apSteps.size(); i++ )
{ {
Song* pSong = apSongs[i]; Song* pSong = apSongs[i];
ASSERT( pSong );
Steps* pSteps = apSteps[i]; Steps* pSteps = apSteps[i];
ASSERT( pSteps );
const AttackArray &aa = asModifiers[i]; const AttackArray &aa = asModifiers[i];
NoteData ndTemp; NoteData ndTemp;
pSteps->GetNoteData( ndTemp ); pSteps->GetNoteData( ndTemp );
+5
View File
@@ -739,8 +739,12 @@ void ScreenGameplay::InitSongQueues()
m_apSongsQueue.clear(); m_apSongsQueue.clear();
PlayerNumber pnMaster = GAMESTATE->m_MasterPlayerNumber; PlayerNumber pnMaster = GAMESTATE->m_MasterPlayerNumber;
Trail *pTrail = GAMESTATE->m_pCurTrail[pnMaster]; Trail *pTrail = GAMESTATE->m_pCurTrail[pnMaster];
ASSERT( pTrail );
FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e ) FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e )
{
ASSERT( e->pSong );
m_apSongsQueue.push_back( e->pSong ); m_apSongsQueue.push_back( e->pSong );
}
FOREACH_EnabledPlayer(p) FOREACH_EnabledPlayer(p)
{ {
@@ -751,6 +755,7 @@ void ScreenGameplay::InitSongQueues()
m_asModifiersQueue[p].clear(); m_asModifiersQueue[p].clear();
FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e ) FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e )
{ {
ASSERT( e->pSteps );
m_vpStepsQueue[p].push_back( e->pSteps ); m_vpStepsQueue[p].push_back( e->pSteps );
AttackArray a; AttackArray a;
e->GetAttackArray( a ); e->GetAttackArray( a );