mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Remove questionable Mutex copy code
It is no longer needed, and it had a comment that it needed review... Now anybody who tries to make a copy again is forced to think about it, instead of trying and using possibly wrong semantics by accident.
This commit is contained in:
parent
f50550c4b9
commit
3e83380350
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user