diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index d020850765..e33245f16d 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -2411,7 +2411,7 @@ void GameManager::GetStylesForGame( const Game *pGame, vector& aSt const Game *GameManager::GetGameForStyle( const Style *pStyle ) const { - for( size_t g=0; gm_apStyles[s]; ++s ) @@ -2425,7 +2425,7 @@ const Game *GameManager::GetGameForStyle( const Style *pStyle ) const const Style* GameManager::GetEditorStyleForStepsType( StepsType st ) const { - for( size_t g=0; gm_apStyles[s]; ++s ) @@ -2535,7 +2535,7 @@ const Style *GameManager::GetFirstCompatibleStyle( const Game *pGame, int iNumPl void GameManager::GetEnabledGames( vector& aGamesOut ) const { - for( size_t g=0; g= 0 ); - ASSERT( index < (int) ARRAYSIZE(g_Games) ); + ASSERT( index < (int) ARRAYLEN(g_Games) ); return g_Games[index]; } @@ -2644,7 +2644,7 @@ RString GameManager::StyleToLocalizedString( const Style* style ) const Game* GameManager::StringToGameType( RString sGameType ) { - for( size_t i=0; im_szName) ) return g_Games[i]; diff --git a/stepmania/src/LifeMeterTime.cpp b/stepmania/src/LifeMeterTime.cpp index cdef5e3329..9e3d874781 100644 --- a/stepmania/src/LifeMeterTime.cpp +++ b/stepmania/src/LifeMeterTime.cpp @@ -34,7 +34,7 @@ static const float g_fTimeMeterSecondsChangeInit[] = -0.0f, // SE_Held -4.0f, // SE_LetGo }; -COMPILE_ASSERT( ARRAYSIZE(g_fTimeMeterSecondsChangeInit) == NUM_ScoreEvent ); +COMPILE_ASSERT( ARRAYLEN(g_fTimeMeterSecondsChangeInit) == NUM_ScoreEvent ); static void TimeMeterSecondsChangeInit( size_t /*ScoreEvent*/ i, RString &sNameOut, float &defaultValueOut ) { diff --git a/stepmania/src/RageSoundReader_Preload.cpp b/stepmania/src/RageSoundReader_Preload.cpp index fca2fe820d..d9e123a3d7 100644 --- a/stepmania/src/RageSoundReader_Preload.cpp +++ b/stepmania/src/RageSoundReader_Preload.cpp @@ -75,7 +75,7 @@ bool RageSoundReader_Preload::Open( RageSoundReader *pSource ) return false; /* Don't bother trying to preload it. */ float buffer[1024]; - int iCnt = pSource->Read( buffer, ARRAYSIZE(buffer) / m_iChannels ); + int iCnt = pSource->Read( buffer, ARRAYLEN(buffer) / m_iChannels ); if( iCnt == END_OF_FILE ) break; diff --git a/stepmania/src/ScoreKeeperRave.cpp b/stepmania/src/ScoreKeeperRave.cpp index 66eb194c50..6b3b68107b 100644 --- a/stepmania/src/ScoreKeeperRave.cpp +++ b/stepmania/src/ScoreKeeperRave.cpp @@ -27,7 +27,7 @@ static const float g_fSuperMeterPercentChangeInit[] = +0.04f, // SE_Held -0.20f, // SE_LetGo }; -COMPILE_ASSERT( ARRAYSIZE(g_fSuperMeterPercentChangeInit) == NUM_ScoreEvent ); +COMPILE_ASSERT( ARRAYLEN(g_fSuperMeterPercentChangeInit) == NUM_ScoreEvent ); static void SuperMeterPercentChangeInit( size_t /*ScoreEvent*/ i, RString &sNameOut, float &defaultValueOut ) { diff --git a/stepmania/src/arch/MovieTexture/MovieTexture_Generic.cpp b/stepmania/src/arch/MovieTexture/MovieTexture_Generic.cpp index 09e4b5126f..ae14237fc9 100644 --- a/stepmania/src/arch/MovieTexture/MovieTexture_Generic.cpp +++ b/stepmania/src/arch/MovieTexture/MovieTexture_Generic.cpp @@ -495,7 +495,7 @@ static EffectMode EffectModes[] = { EffectMode_YUYV422, }; -COMPILE_ASSERT( ARRAYSIZE(EffectModes) == NUM_PixelFormatYCbCr ); +COMPILE_ASSERT( ARRAYLEN(EffectModes) == NUM_PixelFormatYCbCr ); EffectMode MovieTexture_Generic::GetEffectMode( MovieDecoderPixelFormatYCbCr fmt ) {