mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 02:19:18 -05:00
clang-tidy: Use = delete
This commit is contained in:
committed by
Brad King
parent
d75fec5a88
commit
b05b778a2d
@@ -11,18 +11,18 @@ namespace cm {
|
||||
class shared_mutex
|
||||
{
|
||||
uv_rwlock_t _M_;
|
||||
CM_DISABLE_COPY(shared_mutex)
|
||||
|
||||
public:
|
||||
shared_mutex() { uv_rwlock_init(&_M_); }
|
||||
~shared_mutex() { uv_rwlock_destroy(&_M_); }
|
||||
|
||||
void lock() { uv_rwlock_wrlock(&_M_); }
|
||||
shared_mutex(shared_mutex const&) = delete;
|
||||
shared_mutex& operator=(shared_mutex const&) = delete;
|
||||
|
||||
void lock() { uv_rwlock_wrlock(&_M_); }
|
||||
void unlock() { uv_rwlock_wrunlock(&_M_); }
|
||||
|
||||
void lock_shared() { uv_rwlock_rdlock(&_M_); }
|
||||
|
||||
void unlock_shared() { uv_rwlock_rdunlock(&_M_); }
|
||||
};
|
||||
|
||||
@@ -30,7 +30,6 @@ template <typename T>
|
||||
class shared_lock
|
||||
{
|
||||
T& _mutex;
|
||||
CM_DISABLE_COPY(shared_lock)
|
||||
|
||||
public:
|
||||
shared_lock(T& m)
|
||||
@@ -38,7 +37,12 @@ public:
|
||||
{
|
||||
_mutex.lock_shared();
|
||||
}
|
||||
|
||||
~shared_lock() { _mutex.unlock_shared(); }
|
||||
|
||||
shared_lock(shared_lock const&) = delete;
|
||||
shared_lock& operator=(shared_lock const&) = delete;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user