Running astyle [ci skip]

This commit is contained in:
orbitcowboy 2021-07-26 16:32:00 +02:00
parent 84ea0a2295
commit c14bb9cd2e
3 changed files with 7 additions and 5 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -1394,7 +1394,8 @@ private:
}
void iterator27()
{ // #10378
{
// #10378
check("struct A {\n"
" int a;\n"
" int b;\n"