Use an indexed loop instead.

This commit is contained in:
Jason Felds
2013-04-29 23:56:17 -04:00
parent 6465aefc1b
commit 17c8afb190
+3 -3
View File
@@ -111,11 +111,11 @@ struct MenuRowDef
bool SetDefaultChoiceIfPresent( RString sChoice )
{
iDefaultChoice = 0;
FOREACH_CONST( RString, choices, s )
for (unsigned i = 0; i < choices.size(); ++i)
{
if( sChoice == *s )
if (choices[i] == sChoice)
{
iDefaultChoice = s - choices.begin();
iDefaultChoice = i;
return true;
}
}