From 5e20cb4cf4e76cebfdf137ac66483f3aa467191f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 11 Jul 2004 05:19:37 +0000 Subject: [PATCH] cleanup --- stepmania/src/GameManager.cpp | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index de4c2333e4..0eed59cd33 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -2849,17 +2849,12 @@ void GameManager::GetNotesTypesForGame( Game game, vector& aNotesType for( unsigned s=0; !found && sm_Game != game ) + if( style->m_Game != game || style->m_StepsType != st ) continue; - for( int pl = 0; !found && pl < NUM_PLAYERS; ++pl) - { - if( style->m_StepsType != st ) - continue; - found=true; - } + found = true; } - if(found) + if( found ) aNotesTypeAddTo.push_back( st ); } } @@ -2912,13 +2907,7 @@ bool GameManager::IsGameEnabled( Game game ) int GameManager::NotesTypeToNumTracks( StepsType st ) { - if( st >= NUM_STEPS_TYPES ) - { - // invalid StepsType - ASSERT(0); - return -1; - } - + ASSERT_M( st < NUM_STEPS_TYPES, ssprintf("%i", st) ); return NotesTypes[st].NumTracks; } @@ -2945,13 +2934,7 @@ StepsType GameManager::StringToNotesType( CString sNotesType ) CString GameManager::NotesTypeToString( StepsType st ) { - if( st >= NUM_STEPS_TYPES ) - { - // invalid StepsType - ASSERT(0); - return ""; - } - + ASSERT_M( st < NUM_STEPS_TYPES, ssprintf("%i", st) ); return NotesTypes[st].name; }