Skip to content

Commit

Permalink
checkother.cpp: Avoid redundant copy (#6544)
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitcowboy committed Jun 24, 2024
1 parent 199418d commit d19d8e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checkother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3681,7 +3681,7 @@ void CheckOther::checkShadowVariables()
continue;

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

0 comments on commit d19d8e8

Please sign in to comment.