we don't need an extra variable here

This commit is contained in:
Devin J. Pohly
2013-01-25 18:02:57 -05:00
parent 900d04e624
commit f68d921d4c
+3 -4
View File
@@ -626,9 +626,9 @@ bool CheckVideoDefaultSettings()
LOG->Trace( "Last seen video driver: %s", PREFSMAN->m_sLastSeenVideoDriver.Get().c_str() );
VideoCardDefaults defaults;
bool found = false;
for( unsigned i=0; i<ARRAYLEN(g_VideoCardDefaults); i++ )
unsigned i;
for( i=0; i<ARRAYLEN(g_VideoCardDefaults); i++ )
{
defaults = g_VideoCardDefaults[i];
@@ -637,11 +637,10 @@ bool CheckVideoDefaultSettings()
if( regex.Compare(sVideoDriver) )
{
LOG->Trace( "Card matches '%s'.", sDriverRegex.size()? sDriverRegex.c_str():"(unknown card)" );
found = true;
break;
}
}
if (!found)
if (i >= ARRAYLEN(g_VideoCardDefaults))
{
FAIL_M("Failed to match video driver");
}