diff options
Diffstat (limited to 'compat/mutex.cpp')
-rw-r--r-- | compat/mutex.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/compat/mutex.cpp b/compat/mutex.cpp new file mode 100644 index 00000000..55789a22 --- /dev/null +++ b/compat/mutex.cpp @@ -0,0 +1,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; +} |