clang-tidy: fix performance-trivially-destructible warnings

This commit is contained in:
Ben Boeckel
2021-01-22 10:37:26 -05:00
parent 4f396e6528
commit 4470eb5179
10 changed files with 7 additions and 19 deletions
+3 -6
View File
@@ -145,10 +145,7 @@ cmFileLockResult cmFileLockPool::ScopePool::Release(
bool cmFileLockPool::ScopePool::IsAlreadyLocked(
const std::string& filename) const
{
for (auto const& lock : this->Locks) {
if (lock.IsLocked(filename)) {
return true;
}
}
return false;
return std::any_of(
this->Locks.begin(), this->Locks.end(),
[&filename](auto const& lock) { return lock.IsLocked(filename); });
}