diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/mutex.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/utils/mutex.h b/src/utils/mutex.h index ad95b17b..b4661c70 100644 --- a/src/utils/mutex.h +++ b/src/utils/mutex.h @@ -35,14 +35,14 @@ class Mutex public: Mutex(); ~Mutex(); + Mutex(Mutex&&) = delete; // prevent moving + Mutex(const Mutex&) = delete; // prevent copying + Mutex& operator=(const Mutex&) = delete; void lock(); void unlock(); private: - Mutex(const Mutex&); // prevent copying - Mutex& operator=(const Mutex&); - SDL_mutex *mMutex; }; @@ -54,12 +54,11 @@ class MutexLocker public: MutexLocker(Mutex *mutex); MutexLocker(MutexLocker&&); + MutexLocker(const MutexLocker&) = delete; // prevent copying + MutexLocker& operator=(const MutexLocker&) = delete; ~MutexLocker(); private: - MutexLocker(const MutexLocker&); // prevent copying - MutexLocker& operator=(const MutexLocker&); - Mutex *mMutex; }; |