blob: 55789a220dfb8ea43cbd62bb32db4034a808da6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "mutex.hpp"
#include <cstdlib>
mutex& mutex::operator=(const mutex& rhs)
{
if (rhs->isRecursive() != inner.isRecursive())
std::abort();
return *this;
}
mutex::mutex(const mutex& datum) : mutex{datum.inner.isRecursive() ? Recursive : NonRecursive}
{
}
mutex::mutex(RecursionMode m) : inner{m}
{
}
QMutex* mutex::operator&() const
{
return *this;
}
mutex::operator QMutex*() const
{
return &inner;
}
QMutex* mutex::operator->() const
{
return *this;
}
|