More loops, more deletion spots.
This commit is contained in:
@@ -23,8 +23,10 @@ WorkoutGraph::WorkoutGraph()
|
|||||||
|
|
||||||
WorkoutGraph::~WorkoutGraph()
|
WorkoutGraph::~WorkoutGraph()
|
||||||
{
|
{
|
||||||
FOREACH( Sprite*, m_vpBars, a )
|
for (Sprite *s : m_vpBars)
|
||||||
delete *a;
|
{
|
||||||
|
delete s;
|
||||||
|
}
|
||||||
m_vpBars.clear();
|
m_vpBars.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,10 +50,10 @@ void WorkoutGraph::SetFromCurrentWorkout()
|
|||||||
|
|
||||||
void WorkoutGraph::SetInternal( int iMinSongsPlayed )
|
void WorkoutGraph::SetInternal( int iMinSongsPlayed )
|
||||||
{
|
{
|
||||||
FOREACH( Sprite*, m_vpBars, p )
|
for (Sprite *s : m_vpBars)
|
||||||
{
|
{
|
||||||
this->RemoveChild( *p );
|
this->RemoveChild( s );
|
||||||
delete *p;
|
delete s;
|
||||||
}
|
}
|
||||||
m_vpBars.clear();
|
m_vpBars.clear();
|
||||||
|
|
||||||
@@ -105,8 +107,8 @@ void WorkoutGraph::SetFromGameStateAndHighlightSong( int iSongIndex )
|
|||||||
{
|
{
|
||||||
SetInternal( iSongIndex+1 );
|
SetInternal( iSongIndex+1 );
|
||||||
|
|
||||||
FOREACH( Sprite*, m_vpBars, spr )
|
for (Sprite *s : m_vpBars)
|
||||||
(*spr)->StopEffect();
|
s->StopEffect();
|
||||||
|
|
||||||
int iBarIndex = iSongIndex - m_iSongsChoppedOffAtBeginning;
|
int iBarIndex = iSongIndex - m_iSongsChoppedOffAtBeginning;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user