From c820d2ba97edc3e7ebecc3463f9b24d583997595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 21 Aug 2022 17:33:43 +0200 Subject: [PATCH] refactoring --- lib/astutils.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 42c816fda..e30fbfd6e 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1876,12 +1876,10 @@ bool isUniqueExpression(const Token* tok) v.isPointer() == var->isPointer() && v.name() != var->name(); }; - bool other = std::any_of(scope->varlist.cbegin(), scope->varlist.cend(), pred); - if (other) + if (std::any_of(scope->varlist.cbegin(), scope->varlist.cend(), pred)) return false; if (fun) { - other = std::any_of(fun->argumentList.cbegin(), fun->argumentList.cend(), pred); - if (other) + if (std::any_of(fun->argumentList.cbegin(), fun->argumentList.cend(), pred)) return false; } } else if (!isUniqueExpression(tok->astOperand1())) {