diff --git a/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp b/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp index 94007b2c65..b2fdae934b 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -89,8 +89,7 @@ InputHandler_DInput::InputHandler_DInput() if ( hr != DI_OK ) RageException::Throw( hr_ssprintf(hr, "InputHandler_DInput: IDirectInput::EnumDevices") ); - unsigned i; - for( i = 0; i < Devices.size(); ++i ) + for( unsigned i = 0; i < Devices.size(); ++i ) { if( Devices[i].Open() ) continue; @@ -101,7 +100,7 @@ InputHandler_DInput::InputHandler_DInput() } LOG->Info( "Found %u DirectInput devices:", Devices.size() ); - for( i = 0; i < Devices.size(); ++i ) + for( unsigned i = 0; i < Devices.size(); ++i ) { LOG->Info( " %d: '%s' axes: %d, hats: %d, buttons: %d (%s)", i, @@ -460,10 +459,9 @@ void InputHandler_DInput::InputThreadMain() /* Enable priority boosting. */ SetThreadPriorityBoost( GetCurrentThread(), FALSE ); - unsigned i; vector BufferedDevices, UnbufferedDevices; HANDLE Handle = CreateEvent(NULL, FALSE, FALSE, NULL); - for( i = 0; i < Devices.size(); ++i ) + for( unsigned i = 0; i < Devices.size(); ++i ) { if( !Devices[i].buffered ) { @@ -498,7 +496,7 @@ void InputHandler_DInput::InputThreadMain() if( ret == WAIT_OBJECT_0 ) { RageTimer now; - for( i = 0; i < BufferedDevices.size(); ++i ) + for( unsigned i = 0; i < BufferedDevices.size(); ++i ) UpdateBuffered( *BufferedDevices[i], now ); } } @@ -511,7 +509,7 @@ void InputHandler_DInput::InputThreadMain() } CHECKPOINT; - for( i = 0; i < Devices.size(); ++i ) + for( unsigned i = 0; i < Devices.size(); ++i ) { if( !Devices[i].buffered ) continue; diff --git a/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp b/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp index 06ee22b1fc..6574944680 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp @@ -94,8 +94,7 @@ void InputHandler_Win32_Pump::InputThreadMain() SetThreadPriorityBoost( GetCurrentThread(), FALSE ); vector sources; - int i; - for(i = 0; i < NUM_PUMPS; ++i) + for( int i = 0; i < NUM_PUMPS; ++i ) { if( dev[i].io.IsOpen() ) sources.push_back( &dev[i].io ); diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_SDL.cpp b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_SDL.cpp index 84e680eba6..4ddeacaa8f 100644 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_SDL.cpp +++ b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_SDL.cpp @@ -66,8 +66,7 @@ CString LowLevelWindow_SDL::TryVideoMode( RageDisplay::VideoModeParams p, bool & } } - int i; - for( i = 0; i < SDL_NUMEVENTS; ++i) + for( int i = 0; i < SDL_NUMEVENTS; ++i ) EventEnabled[i] = mySDL_EventState( (Uint8) i, SDL_QUERY ); SDL_QuitSubSystem(SDL_INIT_VIDEO); @@ -83,7 +82,7 @@ CString LowLevelWindow_SDL::TryVideoMode( RageDisplay::VideoModeParams p, bool & } /* Put them back. */ - for( i = 0; i < SDL_NUMEVENTS; ++i) + for( int i = 0; i < SDL_NUMEVENTS; ++i) mySDL_EventState((Uint8) i, EventEnabled[i]); mySDL_PushEvents(events); diff --git a/stepmania/src/arch/MovieTexture/MovieTexture_DShow.cpp b/stepmania/src/arch/MovieTexture/MovieTexture_DShow.cpp index 5cb47d63f8..08ca2fcf2d 100644 --- a/stepmania/src/arch/MovieTexture/MovieTexture_DShow.cpp +++ b/stepmania/src/arch/MovieTexture/MovieTexture_DShow.cpp @@ -72,10 +72,10 @@ static void CheckCodecVersion( CString codec, CString desc ) static void GetVideoCodecDebugInfo() { ICINFO info = { sizeof(ICINFO) }; - int i; LOG->Info("Video codecs:"); CHECKPOINT; - for(i=0; ICInfo(ICTYPE_VIDEO, i, &info); ++i) + int i; + for( i=0; ICInfo(ICTYPE_VIDEO, i, &info); ++i ) { CHECKPOINT; if( FourCCToString(info.fccHandler) == "ASV1" ) diff --git a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp index 0b4a958e8b..709c48e820 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp +++ b/stepmania/src/arch/Sound/RageSoundDriver_Generic_Software.cpp @@ -256,8 +256,7 @@ void RageSound_Generic_Software::Update(float delta) /* We must not lock here, since the decoder thread might hold the lock for a * while at a time. This is threadsafe, because once a sound is in STOPPING, * this is the only place it'll be changed (to STOPPED). */ - unsigned i; - for( i = 0; i < ARRAYSIZE(sounds); ++i ) + for( unsigned i = 0; i < ARRAYSIZE(sounds); ++i ) { if( sounds[i].state != sound::STOPPING ) continue; diff --git a/stepmania/src/archutils/Win32/DebugInfoHunt.cpp b/stepmania/src/archutils/Win32/DebugInfoHunt.cpp index 3f5ed7092c..6641904d2a 100644 --- a/stepmania/src/archutils/Win32/DebugInfoHunt.cpp +++ b/stepmania/src/archutils/Win32/DebugInfoHunt.cpp @@ -33,8 +33,7 @@ static void GetDisplayDriverDebugInfo() LOG->Info( "Primary display driver could not be determined." ); bool LoggedSomething = false; - int i; - for( i=0; true; i++ ) + for( int i=0; true; i++ ) { VideoDriverInfo info; if( !GetVideoDriverInfo(i, info) ) @@ -57,7 +56,7 @@ static void GetDisplayDriverDebugInfo() LOG->Info( "Primary display driver: %s", sPrimaryDeviceName.c_str() ); LOG->Warn("Couldn't find primary display driver; logging all drivers"); - for( i=0; true; i++ ) + for( int i=0; true; i++ ) { VideoDriverInfo info; if( !GetVideoDriverInfo(i, info) )