From e50c784e2ca55735fc360ae51534288c2ea59ca5 Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 23 Jan 2016 05:45:00 +0100 Subject: Fix C++11 compilability Previous commits broke it... :( --- src/threading/mutex.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/threading/mutex.cpp') diff --git a/src/threading/mutex.cpp b/src/threading/mutex.cpp index e12b79185..f2b07bec3 100644 --- a/src/threading/mutex.cpp +++ b/src/threading/mutex.cpp @@ -34,7 +34,18 @@ DEALINGS IN THE SOFTWARE. #define UNUSED(expr) do { (void)(expr); } while (0) +Mutex::Mutex() +{ + init_mutex(false); +} + + Mutex::Mutex(bool recursive) +{ + init_mutex(recursive); +} + +void Mutex::init_mutex(bool recursive) { #ifdef _WIN32 // Windows critical sections are recursive by default @@ -89,5 +100,9 @@ void Mutex::unlock() #endif } +RecursiveMutex::RecursiveMutex() + : Mutex(true) +{} + #endif -- cgit v1.2.3