Skip to content

Commit d19d8e8

Browse files
authored
checkother.cpp: Avoid redundant copy (#6544)
1 parent 199418d commit d19d8e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/checkother.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3681,7 +3681,7 @@ void CheckOther::checkShadowVariables()
36813681
continue;
36823682

36833683
if (functionScope && functionScope->type == Scope::ScopeType::eFunction && functionScope->function) {
3684-
const auto argList = functionScope->function->argumentList;
3684+
const auto & argList = functionScope->function->argumentList;
36853685
auto it = std::find_if(argList.cbegin(), argList.cend(), [&](const Variable& arg) {
36863686
return arg.nameToken() && var.name() == arg.name();
36873687
});

0 commit comments

Comments
 (0)