From b9e1d53d7ac4e8d19520e3063b194ee01f550198 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 17 Jul 2017 14:21:09 -0700 Subject: Minor cleanup. --- node/Mutex.hpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'node/Mutex.hpp') diff --git a/node/Mutex.hpp b/node/Mutex.hpp index 6f1d3471..854f321a 100644 --- a/node/Mutex.hpp +++ b/node/Mutex.hpp @@ -41,7 +41,6 @@ class Mutex : NonCopyable { public: Mutex() - throw() { pthread_mutex_init(&_mh,(const pthread_mutexattr_t *)0); } @@ -52,25 +51,21 @@ public: } inline void lock() - throw() { pthread_mutex_lock(&_mh); } inline void unlock() - throw() { pthread_mutex_unlock(&_mh); } inline void lock() const - throw() { (const_cast (this))->lock(); } inline void unlock() const - throw() { (const_cast (this))->unlock(); } @@ -81,15 +76,13 @@ public: class Lock : NonCopyable { public: - Lock(Mutex &m) - throw() : + Lock(Mutex &m) : _m(&m) { m.lock(); } - Lock(const Mutex &m) - throw() : + Lock(const Mutex &m) : _m(const_cast(&m)) { _m->lock(); @@ -123,7 +116,6 @@ class Mutex : NonCopyable { public: Mutex() - throw() { InitializeCriticalSection(&_cs); } @@ -134,25 +126,21 @@ public: } inline void lock() - throw() { EnterCriticalSection(&_cs); } inline void unlock() - throw() { LeaveCriticalSection(&_cs); } inline void lock() const - throw() { (const_cast (this))->lock(); } inline void unlock() const - throw() { (const_cast (this))->unlock(); } @@ -160,15 +148,13 @@ public: class Lock : NonCopyable { public: - Lock(Mutex &m) - throw() : + Lock(Mutex &m) : _m(&m) { m.lock(); } - Lock(const Mutex &m) - throw() : + Lock(const Mutex &m) : _m(const_cast(&m)) { _m->lock(); -- cgit v1.2.3