From c14bb9cd2e391d09da8d268329883c93f440382e Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 26 Jul 2021 16:32:00 +0200 Subject: [PATCH] Running astyle [ci skip] --- lib/programmemory.cpp | 3 ++- lib/token.cpp | 6 +++--- test/teststl.cpp | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/programmemory.cpp b/lib/programmemory.cpp index fbe92a27e..1078a167d 100644 --- a/lib/programmemory.cpp +++ b/lib/programmemory.cpp @@ -465,7 +465,8 @@ static PMEvaluateFunction evaluateAsInt(PMEvaluateFunction f, ValueFlow::Value:: const ValueFlow::Value* value = expr->getKnownValue(t); if (!value) value = programMemory->getValue(expr->exprId()); - if (value && value->valueType == t) { + if (value && value->valueType == t) + { *result = value->intvalue; return true; } diff --git a/lib/token.cpp b/lib/token.cpp index ed81bc233..a17283302 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -2388,9 +2388,9 @@ bool Token::hasKnownValue() const bool Token::hasKnownValue(ValueFlow::Value::ValueType t) const { return mImpl->mValues && - std::any_of(mImpl->mValues->begin(), mImpl->mValues->end(), [&](const ValueFlow::Value& value) { - return value.isKnown() && value.valueType == t; - }); + std::any_of(mImpl->mValues->begin(), mImpl->mValues->end(), [&](const ValueFlow::Value& value) { + return value.isKnown() && value.valueType == t; + }); } const ValueFlow::Value* Token::getKnownValue(ValueFlow::Value::ValueType t) const diff --git a/test/teststl.cpp b/test/teststl.cpp index e395e0dc1..9415f8f41 100644 --- a/test/teststl.cpp +++ b/test/teststl.cpp @@ -1394,7 +1394,8 @@ private: } void iterator27() - { // #10378 + { + // #10378 check("struct A {\n" " int a;\n" " int b;\n"