Refactoring: Use range for loop
This commit is contained in:
parent
b8e8b12783
commit
044c4b7fbb
|
@ -789,10 +789,10 @@ bool isVariableChangedByFunctionCall(const Token *tok, const Settings *settings,
|
||||||
const unsigned int argCount = numberOfArguments(tok);
|
const unsigned int argCount = numberOfArguments(tok);
|
||||||
const Scope *typeScope = tok->variable()->typeScope();
|
const Scope *typeScope = tok->variable()->typeScope();
|
||||||
if (typeScope) {
|
if (typeScope) {
|
||||||
for (std::list<Function>::const_iterator it = typeScope->functionList.begin(); it != typeScope->functionList.end(); ++it) {
|
for (const Function &function : typeScope->functionList) {
|
||||||
if (!it->isConstructor() || it->argCount() < argCount)
|
if (!function.isConstructor() || function.argCount() < argCount)
|
||||||
continue;
|
continue;
|
||||||
const Variable *arg = it->getArgumentVar(argnr);
|
const Variable *arg = function.getArgumentVar(argnr);
|
||||||
if (arg && arg->isReference() && !arg->isConst())
|
if (arg && arg->isReference() && !arg->isConst())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue