diff options
Diffstat (limited to 'Source/cmFileLockPool.cxx')
-rw-r--r-- | Source/cmFileLockPool.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmFileLockPool.cxx b/Source/cmFileLockPool.cxx index e1f6e94..4ca924b 100644 --- a/Source/cmFileLockPool.cxx +++ b/Source/cmFileLockPool.cxx @@ -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); }); } |