Break loop early

This commit is contained in:
Dmitry-Me 2017-12-21 03:13:00 +03:00
parent 82825ab721
commit 8851fd64a6
1 changed files with 3 additions and 1 deletions

View File

@ -632,8 +632,10 @@ void CheckCondition::multiCondition2()
}
bool changed = false;
for (std::set<unsigned int>::const_iterator it = vars.begin(); it != vars.end(); ++it) {
if (isVariableChanged(tok1, tok2, *it, nonlocal, _settings))
if (isVariableChanged(tok1, tok2, *it, nonlocal, _settings)) {
changed = true;
break;
}
}
if (changed)
break;