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 {
|
||||
if (!mImpl->mValues)
|
||||
return false;
|
||||
for (const ValueFlow::Value &value : *mImpl->mValues) {
|
||||
if (value.isKnown() && value.isIntValue())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return std::any_of(mImpl->mValues->begin(), mImpl->mValues->end(), [](const ValueFlow::Value &value) {
|
||||
return value.isKnown() && value.isIntValue();
|
||||
});
|
||||
}
|
||||
|
||||
bool hasKnownValue() const {
|
||||
|
|
Loading…
Reference in New Issue