Fix Cppcheck warning; useStlAlgorithm

This commit is contained in:
Daniel Marjamäki 2021-02-09 21:47:56 +01:00
parent ef726aaece
commit 0fa225ecb5
1 changed files with 3 additions and 3 deletions

View File

@ -2843,9 +2843,9 @@ Check::FileInfo *CheckClass::getFileInfo(const Tokenizer *tokenizer, const Setti
std::vector<MyFileInfo::NameLoc> classDefinitions;
for (const Scope * classScope : tokenizer->getSymbolDatabase()->classAndStructScopes) {
// the full definition must be compared
bool fullDefinition = true;
for (const Function &f: classScope->functionList)
fullDefinition &= f.hasBody();
bool fullDefinition = std::all_of(classScope->functionList.begin(),
classScope->functionList.end(),
[](const Function& f) { return f.hasBody(); });
if (!fullDefinition)
continue;