From 38e1b57bc9a836df791c1aeaee7b484b700610ea Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 21 Jul 2020 13:18:45 -0500 Subject: [PATCH] Use refs --- lib/valueflow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index dfa85eb03..cf7e94f46 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -2490,8 +2490,8 @@ struct SingleValueFlowForwardAnalyzer : ValueFlowForwardAnalyzer { virtual bool isAlias(const Token* tok) const OVERRIDE { if (value.isLifetimeValue()) return false; - for(const auto& m:{getVars(), getAliasedVars()}) { - for (const auto& p:m) { + for(const auto& m:{std::ref(getVars()), std::ref(getAliasedVars())}) { + for (const auto& p:m.get()) { nonneg int varid = p.first; const Variable* var = p.second; if (tok->varId() == varid)