more "for" scope fixes
This commit is contained in:
@@ -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<DIDevice*> 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;
|
||||
|
||||
@@ -94,8 +94,7 @@ void InputHandler_Win32_Pump::InputThreadMain()
|
||||
SetThreadPriorityBoost( GetCurrentThread(), FALSE );
|
||||
|
||||
vector<WindowsFileIO *> 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 );
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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" )
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) )
|
||||
|
||||
Reference in New Issue
Block a user