Module: check_mk
Branch: master
Commit: 59e18f80e68cb3d4be2293b651e70c99fd5698fa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=59e18f80e68cb3…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Nov 16 17:22:26 2015 +0100
'= delete' is C++11 only. :-/ Clang-formatted Mutex.h on the way.
---
livestatus/src/Mutex.h | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/livestatus/src/Mutex.h b/livestatus/src/Mutex.h
index 533b2e4..44d20b2 100644
--- a/livestatus/src/Mutex.h
+++ b/livestatus/src/Mutex.h
@@ -51,8 +51,8 @@ public:
void unlock() { check(pthread_mutex_unlock(native_handle())); }
native_handle_type native_handle() { return &_mutex; }
private:
- mutex(const mutex &); // = delete
- mutex &operator=(const mutex &); // = delete
+ mutex(const mutex &); // = delete
+ mutex &operator=(const mutex &); // = delete
static void check(int status)
{
@@ -87,8 +87,8 @@ public:
void unlock() { check(pthread_mutex_unlock(native_handle())); }
native_handle_type native_handle() { return &_mutex; }
private:
- recursive_mutex(const recursive_mutex&) = delete;
- recursive_mutex& operator=(const recursive_mutex&) = delete;
+ recursive_mutex(const recursive_mutex &); // = delete;
+ recursive_mutex &operator=(const recursive_mutex &); // = delete;
static void check(int status)
{
@@ -101,8 +101,9 @@ private:
};
-struct adopt_lock_t { };
-const adopt_lock_t adopt_lock = { }; // constexpr
+struct adopt_lock_t {
+};
+const adopt_lock_t adopt_lock = {}; // constexpr
template <typename Mutex>
class lock_guard {
@@ -112,8 +113,8 @@ public:
lock_guard(mutex_type &m, adopt_lock_t) : _mutex(m) {}
~lock_guard() { _mutex.unlock(); }
private:
- lock_guard(const lock_guard &); // = delete
- lock_guard &operator=(const lock_guard &); // = delete
+ lock_guard(const lock_guard &); // = delete
+ lock_guard &operator=(const lock_guard &); // = delete
mutex_type &_mutex;
};