summaryrefslogtreecommitdiffstats
path: root/Source/cmFileLockPool.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-11-12 16:17:27 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2019-11-14 13:21:30 (GMT)
commit8dd284bf196de65caec90eff8723b59559434149 (patch)
treeb481e6e24ee623c1cd06306c42df08e60f66cedb /Source/cmFileLockPool.h
parentaeb95264e02252aba705166dfb8410baff0e715d (diff)
downloadCMake-8dd284bf196de65caec90eff8723b59559434149.zip
CMake-8dd284bf196de65caec90eff8723b59559434149.tar.gz
CMake-8dd284bf196de65caec90eff8723b59559434149.tar.bz2
cmFileLockPool: enhance items management
Diffstat (limited to 'Source/cmFileLockPool.h')
-rw-r--r--Source/cmFileLockPool.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmFileLockPool.h b/Source/cmFileLockPool.h
index dae68dd..d45c82c 100644
--- a/Source/cmFileLockPool.h
+++ b/Source/cmFileLockPool.h
@@ -8,7 +8,8 @@
#include <string>
#include <vector>
-class cmFileLock;
+#include "cmFileLock.h"
+
class cmFileLockResult;
class cmFileLockPool
@@ -64,7 +65,9 @@ private:
~ScopePool();
ScopePool(ScopePool const&) = delete;
+ ScopePool(ScopePool&&) noexcept;
ScopePool& operator=(ScopePool const&) = delete;
+ ScopePool& operator=(ScopePool&&) noexcept;
cmFileLockResult Lock(const std::string& filename,
unsigned long timeoutSec);
@@ -72,17 +75,12 @@ private:
bool IsAlreadyLocked(const std::string& filename) const;
private:
- using List = std::vector<cmFileLock*>;
- using It = List::iterator;
- using CIt = List::const_iterator;
+ using List = std::vector<cmFileLock>;
List Locks;
};
- using List = std::vector<ScopePool*>;
-
- using It = List::iterator;
- using CIt = List::const_iterator;
+ using List = std::vector<ScopePool>;
List FunctionScopes;
List FileScopes;