optimize adding background changes
I have a song with 5841 background changes and it took 3 seconds to load that song.
This commit is contained in:
+2
-4
@@ -175,14 +175,12 @@ void Song::AddBackgroundChange( BackgroundLayer iLayer, BackgroundChange seg )
|
||||
}
|
||||
|
||||
ASSERT( iLayer >= 0 && iLayer < NUM_BackgroundLayer );
|
||||
GetBackgroundChanges(iLayer).push_back( seg );
|
||||
BackgroundUtil::SortBackgroundChangesArray( GetBackgroundChanges(iLayer) );
|
||||
BackgroundUtil::AddBackgroundChange( GetBackgroundChanges(iLayer), seg );
|
||||
}
|
||||
|
||||
void Song::AddForegroundChange( BackgroundChange seg )
|
||||
{
|
||||
GetForegroundChanges().push_back( seg );
|
||||
BackgroundUtil::SortBackgroundChangesArray( GetForegroundChanges() );
|
||||
BackgroundUtil::AddBackgroundChange( GetForegroundChanges(), seg );
|
||||
}
|
||||
|
||||
void Song::AddLyricSegment( LyricSegment seg )
|
||||
|
||||
Reference in New Issue
Block a user