Skip to content

Commit db1b6ff

Browse files
committed
fix cppcheck warning
1 parent 9e03197 commit db1b6ff

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

lib/importproject.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -839,13 +839,9 @@ namespace {
839839
}
840840
}
841841
bool excludedfromBuild(const ProjectConfiguration &pc, std::vector<std::string> &errors) const {
842-
if (mExcludedFromBuild.empty())
843-
return false;
844-
for (const ExcludedFromBuild &excluded : mExcludedFromBuild) {
845-
if (excluded.conditionIsTrue(pc, mFilename, errors))
846-
return true;
847-
}
848-
return false;
842+
return std::any_of(mExcludedFromBuild.cbegin(), mExcludedFromBuild.cend(), [&](const ExcludedFromBuild &excluded) {
843+
return excluded.conditionIsTrue(pc, mFilename, errors);
844+
});
849845
}
850846
std::string mFilename;
851847
std::list<ExcludedFromBuild> mExcludedFromBuild;

0 commit comments

Comments
 (0)