Simple loops here.

This commit is contained in:
Jason Felds
2013-04-28 17:53:46 -04:00
parent dd00979309
commit 609681649e
+6 -6
View File
@@ -260,10 +260,10 @@ void StepsDisplayList::SetFromGameState()
// DIFFICULTIES_TO_SHOW. // DIFFICULTIES_TO_SHOW.
const vector<Difficulty>& difficulties = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(); const vector<Difficulty>& difficulties = CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue();
m_Rows.resize( difficulties.size() ); m_Rows.resize( difficulties.size() );
FOREACH_CONST( Difficulty, difficulties, d ) for (Difficulty const &d : difficulties)
{ {
m_Rows[i].m_dc = *d; m_Rows[i].m_dc = d;
m_Lines[i].m_Meter.SetFromStepsTypeAndMeterAndDifficultyAndCourseType( GAMESTATE->m_pCurStyle->m_StepsType, 0, *d, CourseType_Invalid ); m_Lines[i].m_Meter.SetFromStepsTypeAndMeterAndDifficultyAndCourseType( GAMESTATE->m_pCurStyle->m_StepsType, 0, d, CourseType_Invalid );
++i; ++i;
} }
} }
@@ -274,11 +274,11 @@ void StepsDisplayList::SetFromGameState()
// Should match the sort in ScreenSelectMusic::AfterMusicChange. // Should match the sort in ScreenSelectMusic::AfterMusicChange.
m_Rows.resize( vpSteps.size() ); m_Rows.resize( vpSteps.size() );
FOREACH_CONST( Steps*, vpSteps, s ) for (Steps const * s: vpSteps)
{ {
//LOG->Trace(ssprintf("setting steps for row %i",i)); //LOG->Trace(ssprintf("setting steps for row %i",i));
m_Rows[i].m_Steps = *s; m_Rows[i].m_Steps = s;
m_Lines[i].m_Meter.SetFromSteps( *s ); m_Lines[i].m_Meter.SetFromSteps( s );
++i; ++i;
} }
} }