Use std::any_of in token.h (#2065)
[lib/token.h:964]: (style) Consider using std::any_of algorithm instead of a raw loop.
This commit is contained in:
parent
aaeec462e6
commit
9ec8886898
|
@ -960,11 +960,9 @@ public:
|
||||||
bool hasKnownIntValue() const {
|
bool hasKnownIntValue() const {
|
||||||
if (!mImpl->mValues)
|
if (!mImpl->mValues)
|
||||||
return false;
|
return false;
|
||||||
for (const ValueFlow::Value &value : *mImpl->mValues) {
|
return std::any_of(mImpl->mValues->begin(), mImpl->mValues->end(), [](const ValueFlow::Value &value) {
|
||||||
if (value.isKnown() && value.isIntValue())
|
return value.isKnown() && value.isIntValue();
|
||||||
return true;
|
});
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasKnownValue() const {
|
bool hasKnownValue() const {
|
||||||
|
|
Loading…
Reference in New Issue