clang-tidy: fix readability-use-anyofallof warnings

This commit is contained in:
Ben Boeckel
2021-01-22 10:39:02 -05:00
parent 9ac8dbbb94
commit ef935b17ab
14 changed files with 161 additions and 189 deletions

View File

@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmFileLockPool.h"
#include <algorithm>
#include <cassert>
#include <utility>
@@ -145,7 +146,8 @@ cmFileLockResult cmFileLockPool::ScopePool::Release(
bool cmFileLockPool::ScopePool::IsAlreadyLocked(
const std::string& filename) const
{
return std::any_of(
this->Locks.begin(), this->Locks.end(),
[&filename](auto const& lock) { return lock.IsLocked(filename); });
return std::any_of(this->Locks.begin(), this->Locks.end(),
[&filename](cmFileLock const& lock) -> bool {
return lock.IsLocked(filename);
});
}