diff --git a/src/support/mutex.cpp b/src/support/mutex.cpp index 042c9b88cd..9f3babda27 100644 --- a/src/support/mutex.cpp +++ b/src/support/mutex.cpp @@ -40,22 +40,6 @@ Mutex::~Mutex() } -// It makes no sense to copy the mutex, -// each instance has its own QMutex, -// therefore nothing to copy! -// TODO review -Mutex::Mutex(const Mutex&) : d(new Private) -{ -} - - -Mutex& Mutex::operator=(const Mutex&) -{ - return *this; -} - - - Mutex::Locker::Locker(Mutex* mtx) : mutex_(mtx) { mutex_->d->qmutex_.lock(); diff --git a/src/support/mutex.h b/src/support/mutex.h index ed3954f03f..5f34f7de51 100644 --- a/src/support/mutex.h +++ b/src/support/mutex.h @@ -21,6 +21,9 @@ namespace lyx { class Mutex { + /// noncopyable + Mutex(const Mutex&); + Mutex& operator=(const Mutex&); public: Mutex(); ~Mutex(); @@ -45,12 +48,6 @@ public: Locker& operator=(const Locker& rhs); Mutex* mutex_; }; - - - // pseude-value semantic - // needed by GuiPrefs which makes a copy - Mutex(const Mutex&); - Mutex& operator=(const Mutex&); private: struct Private;