From d19d8e80ef55ed7885bcb7cfd91de08a97717375 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 24 Jun 2024 18:17:55 +0200 Subject: [PATCH] checkother.cpp: Avoid redundant copy (#6544) --- 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(); });