Minor refactoring for checkother.cpp

This commit is contained in:
Reijo Tomperi 2009-12-06 22:28:38 +02:00
parent 8db35189e0
commit fc40808a8a
1 changed files with 4 additions and 4 deletions

View File

@ -1538,15 +1538,15 @@ static const Token *checkExecutionPaths(const Token *tok, std::list<ExecutionPat
bool foundError = false;
tok = check->parse(*tok, foundError, checks);
std::list<ExecutionPath *>::iterator it;
for (it = checks.begin(); it != checks.end(); ++it)
for (it = checks.begin(); it != checks.end();)
{
while (it != checks.end() && (*it)->bailOut())
if ((*it)->bailOut())
{
delete *it;
it = checks.erase(it);
}
if (it == checks.end())
break;
else
++it;
}
if (checks.empty())
return 0;