From f2b7af71efd58996d0a646f50b675509ead7347d Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Sun, 23 Jun 2024 13:40:44 +0200 Subject: [PATCH] checkother.cpp: Avoid redundant copy --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index acda9dcf377..08ca9bbeb3f 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -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(); });