From 28c8b00e5c358ac3310168a7d12cf80d4498f67c Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:16:02 +0200 Subject: [PATCH] Minor: fix MSVC shadow warning (#3376) --- lib/astutils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index de192f45e..fad205c4a 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1439,18 +1439,18 @@ bool isConstFunctionCall(const Token* ftok, const Library& library) } else if (f->argumentList.empty()) { return f->isConstexpr(); } - } else if (const Library::Function* f = library.getFunction(ftok)) { - if (f->ispure) + } else if (const Library::Function* lf = library.getFunction(ftok)) { + if (lf->ispure) return true; - for (auto&& p : f->argumentChecks) { + for (auto&& p : lf->argumentChecks) { const Library::ArgumentChecks& ac = p.second; if (ac.direction != Library::ArgumentChecks::Direction::DIR_IN) return false; } if (Token::simpleMatch(ftok->previous(), ".")) { - if (!f->isconst) + if (!lf->isconst) return false; - } else if (f->argumentChecks.empty()) { + } else if (lf->argumentChecks.empty()) { return false; } } else {