summaryrefslogtreecommitdiff
path: root/Source/cmFileLockPool.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-01-22 10:39:02 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2021-01-27 08:54:18 -0500
commitef935b17ab47739b1e81e9c6baf6112b7a20f9cb (patch)
tree7f31fc4bcf6efb450e67b29ba6713937515ca956 /Source/cmFileLockPool.cxx
parent9ac8dbbb941194e79fd59acfc4affa018a222745 (diff)
downloadcmake-ef935b17ab47739b1e81e9c6baf6112b7a20f9cb.tar.gz
clang-tidy: fix `readability-use-anyofallof` warnings
Diffstat (limited to 'Source/cmFileLockPool.cxx')
-rw-r--r--Source/cmFileLockPool.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmFileLockPool.cxx b/Source/cmFileLockPool.cxx
index 4ca924b217..99f6885e19 100644
--- a/Source/cmFileLockPool.cxx
+++ b/Source/cmFileLockPool.cxx
@@ -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);
+ });
}