MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getValueNE

Method getValueNE

lib/token.cpp:1946–1954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1944}
1945
1946const ValueFlow::Value * Token::getValueNE(MathLib::bigint val) const
1947{
1948 if (!mImpl->mValues)
1949 return nullptr;
1950 const auto it = std::find_if(mImpl->mValues->cbegin(), mImpl->mValues->cend(), [=](const ValueFlow::Value& value) {
1951 return value.isIntValue() && !value.isImpossible() && value.intvalue != val;
1952 });
1953 return it == mImpl->mValues->end() ? nullptr : &*it;
1954}
1955
1956const ValueFlow::Value * Token::getInvalidValue(const Token *ftok, nonneg int argnr, const Settings &settings) const
1957{

Callers 1

Calls 2

isImpossibleMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected