Loop and efficiency boost.
No need to loop the structure twice.
This commit is contained in:
+5
-5
@@ -127,11 +127,11 @@ void NoteField::CacheAllUsedNoteSkins()
|
|||||||
vector<RString> asSkinsLower;
|
vector<RString> asSkinsLower;
|
||||||
GAMESTATE->GetAllUsedNoteSkins( asSkinsLower );
|
GAMESTATE->GetAllUsedNoteSkins( asSkinsLower );
|
||||||
asSkinsLower.push_back( m_pPlayerState->m_PlayerOptions.GetStage().m_sNoteSkin );
|
asSkinsLower.push_back( m_pPlayerState->m_PlayerOptions.GetStage().m_sNoteSkin );
|
||||||
FOREACH( RString, asSkinsLower, s )
|
for (RString &s : asSkinsLower)
|
||||||
s->MakeLower();
|
{
|
||||||
|
s.MakeLower();
|
||||||
for( unsigned i=0; i < asSkinsLower.size(); ++i )
|
CacheNoteSkin(s);
|
||||||
CacheNoteSkin( asSkinsLower[i] );
|
}
|
||||||
|
|
||||||
/* If we're changing note skins in the editor, we can have old note skins lying
|
/* If we're changing note skins in the editor, we can have old note skins lying
|
||||||
* around. Remove them so they don't accumulate. */
|
* around. Remove them so they don't accumulate. */
|
||||||
|
|||||||
Reference in New Issue
Block a user