Minor refactoring for checkother.cpp
This commit is contained in:
parent
8db35189e0
commit
fc40808a8a
|
@ -1538,15 +1538,15 @@ static const Token *checkExecutionPaths(const Token *tok, std::list<ExecutionPat
|
||||||
bool foundError = false;
|
bool foundError = false;
|
||||||
tok = check->parse(*tok, foundError, checks);
|
tok = check->parse(*tok, foundError, checks);
|
||||||
std::list<ExecutionPath *>::iterator it;
|
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;
|
delete *it;
|
||||||
it = checks.erase(it);
|
it = checks.erase(it);
|
||||||
}
|
}
|
||||||
if (it == checks.end())
|
else
|
||||||
break;
|
++it;
|
||||||
}
|
}
|
||||||
if (checks.empty())
|
if (checks.empty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue