Loop with a shortcut variable.
This commit is contained in:
@@ -94,14 +94,15 @@ RageMovieTexture *RageMovieTexture::Create( RageTextureID ID )
|
||||
|
||||
RageMovieTexture *ret = NULL;
|
||||
|
||||
FOREACH_CONST( RString, DriversToTry, Driver )
|
||||
for (RString const &Driver : DriversToTry)
|
||||
{
|
||||
LOG->Trace( "Initializing driver: %s", Driver->c_str() );
|
||||
RageDriver *pDriverBase = RageMovieTextureDriver::m_pDriverList.Create( *Driver );
|
||||
char const * driverString = Driver.c_str();
|
||||
LOG->Trace( "Initializing driver: %s", driverString );
|
||||
RageDriver *pDriverBase = RageMovieTextureDriver::m_pDriverList.Create( Driver );
|
||||
|
||||
if( pDriverBase == NULL )
|
||||
{
|
||||
LOG->Trace( "Unknown movie driver name: %s", Driver->c_str() );
|
||||
LOG->Trace( "Unknown movie driver name: %s", driverString );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -114,12 +115,12 @@ RageMovieTexture *RageMovieTexture::Create( RageTextureID ID )
|
||||
|
||||
if( ret == NULL )
|
||||
{
|
||||
LOG->Trace( "Couldn't load driver %s: %s", Driver->c_str(), sError.c_str() );
|
||||
LOG->Trace( "Couldn't load driver %s: %s", driverString, sError.c_str() );
|
||||
SAFE_DELETE( ret );
|
||||
continue;
|
||||
}
|
||||
LOG->Trace( "Created movie texture \"%s\" with driver \"%s\"",
|
||||
ID.filename.c_str(), Driver->c_str() );
|
||||
ID.filename.c_str(), driverString );
|
||||
break;
|
||||
}
|
||||
if ( !ret )
|
||||
|
||||
Reference in New Issue
Block a user