More loops here.
This commit is contained in:
+26
-20
@@ -94,13 +94,19 @@ ScreenDebugOverlay::~ScreenDebugOverlay()
|
||||
{
|
||||
this->RemoveAllChildren();
|
||||
|
||||
FOREACH( BitmapText*, m_vptextPages, p )
|
||||
SAFE_DELETE( *p );
|
||||
FOREACH( BitmapText*, m_vptextButton, p )
|
||||
SAFE_DELETE( *p );
|
||||
for (BitmapText *p : m_vptextPages)
|
||||
{
|
||||
SAFE_DELETE(p);
|
||||
}
|
||||
for (BitmapText *p : m_vptextButton)
|
||||
{
|
||||
SAFE_DELETE(p);
|
||||
}
|
||||
m_vptextButton.clear();
|
||||
FOREACH( BitmapText*, m_vptextFunction, p )
|
||||
SAFE_DELETE( *p );
|
||||
for (BitmapText *p : m_vptextFunction)
|
||||
{
|
||||
SAFE_DELETE(p);
|
||||
}
|
||||
m_vptextFunction.clear();
|
||||
}
|
||||
|
||||
@@ -215,12 +221,12 @@ void ScreenDebugOverlay::Init()
|
||||
|
||||
map<RString,int> iNextDebugButton;
|
||||
int iNextGameplayButton = 0;
|
||||
FOREACH( IDebugLine*, *g_pvpSubscribers, p )
|
||||
for (IDebugLine *p : *g_pvpSubscribers)
|
||||
{
|
||||
RString sPageName = (*p)->GetPageName();
|
||||
RString sPageName = p->GetPageName();
|
||||
|
||||
DeviceInput di;
|
||||
switch( (*p)->GetType() )
|
||||
switch( p->GetType() )
|
||||
{
|
||||
case IDebugLine::all_screens:
|
||||
di = g_Mappings.debugButton[iNextDebugButton[sPageName]++];
|
||||
@@ -229,7 +235,7 @@ void ScreenDebugOverlay::Init()
|
||||
di = g_Mappings.gameplayButton[iNextGameplayButton++];
|
||||
break;
|
||||
}
|
||||
(*p)->m_Button = di;
|
||||
p->m_Button = di;
|
||||
|
||||
if( find(m_asPages.begin(), m_asPages.end(), sPageName) == m_asPages.end() )
|
||||
m_asPages.push_back( sPageName );
|
||||
@@ -883,35 +889,35 @@ static void FillProfileStats( Profile *pProfile )
|
||||
PREFSMAN->m_iMaxHighScoresPerListForPlayer.Get();
|
||||
|
||||
vector<Song*> vpAllSongs = SONGMAN->GetAllSongs();
|
||||
FOREACH( Song*, vpAllSongs, pSong )
|
||||
for (Song const *pSong : vpAllSongs)
|
||||
{
|
||||
vector<Steps*> vpAllSteps = (*pSong)->GetAllSteps();
|
||||
FOREACH( Steps*, vpAllSteps, pSteps )
|
||||
vector<Steps*> vpAllSteps = pSong->GetAllSteps();
|
||||
for (Steps const *pSteps : vpAllSteps)
|
||||
{
|
||||
if( rand() % 5 )
|
||||
pProfile->IncrementStepsPlayCount( *pSong, *pSteps );
|
||||
pProfile->IncrementStepsPlayCount( pSong, pSteps );
|
||||
for( int i=0; i<iCount; i++ )
|
||||
{
|
||||
int iIndex = 0;
|
||||
pProfile->AddStepsHighScore( *pSong, *pSteps, MakeRandomHighScore(fPercentDP), iIndex );
|
||||
pProfile->AddStepsHighScore( pSong, pSteps, MakeRandomHighScore(fPercentDP), iIndex );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vector<Course*> vpAllCourses;
|
||||
SONGMAN->GetAllCourses( vpAllCourses, true );
|
||||
FOREACH( Course*, vpAllCourses, pCourse )
|
||||
for (Course const *pCourse : vpAllCourses)
|
||||
{
|
||||
vector<Trail*> vpAllTrails;
|
||||
(*pCourse)->GetAllTrails( vpAllTrails );
|
||||
FOREACH( Trail*, vpAllTrails, pTrail )
|
||||
pCourse->GetAllTrails( vpAllTrails );
|
||||
for (Trail const *pTrail : vpAllTrails)
|
||||
{
|
||||
if( rand() % 5 )
|
||||
pProfile->IncrementCoursePlayCount( *pCourse, *pTrail );
|
||||
pProfile->IncrementCoursePlayCount( pCourse, pTrail );
|
||||
for( int i=0; i<iCount; i++ )
|
||||
{
|
||||
int iIndex = 0;
|
||||
pProfile->AddCourseHighScore( *pCourse, *pTrail, MakeRandomHighScore(fPercentDP), iIndex );
|
||||
pProfile->AddCourseHighScore( pCourse, pTrail, MakeRandomHighScore(fPercentDP), iIndex );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user