From e3373ebfc52af51d7237d8acea584fe0f5798714 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 4 Feb 2016 23:15:48 +0100 Subject: [PATCH] Windows build fix fixes #11096 --- lib/base/object.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/base/object.hpp b/lib/base/object.hpp index 06562cd45..36487d28a 100644 --- a/lib/base/object.hpp +++ b/lib/base/object.hpp @@ -117,8 +117,12 @@ private: Object(const Object& other); Object& operator=(const Object& rhs); +# ifndef _WIN32 + intptr_t m_References; +# else /* _WIN32 */ uintptr_t m_References; - mutable boost::recursive_mutex m_Mutex; +# endif /* _WIN32 */ + mutable uintptr_t m_Mutex; #ifdef I2_DEBUG # ifndef _WIN32 @@ -145,11 +149,10 @@ inline void intrusive_ptr_add_ref(Object *object) inline void intrusive_ptr_release(Object *object) { - uintptr_t refs; #ifdef _WIN32 - refs = InterlockedDecrement(&object->m_References); + uintptr_t refs = InterlockedDecrement(&object->m_References); #else /* _WIN32 */ - refs = __sync_sub_and_fetch(&object->m_References, 1); + intptr_t refs = __sync_sub_and_fetch(&object->m_References, 1); #endif /* _WIN32 */ if (refs == 0) -- 2.40.0