Build fix

fixes #11096
This commit is contained in:
Gunnar Beutner 2016-02-09 13:56:17 +01:00
parent e3373ebfc5
commit 0dc6189f47
1 changed files with 4 additions and 6 deletions

View File

@ -117,11 +117,7 @@ private:
Object(const Object& other);
Object& operator=(const Object& rhs);
# ifndef _WIN32
intptr_t m_References;
# else /* _WIN32 */
uintptr_t m_References;
# endif /* _WIN32 */
mutable uintptr_t m_Mutex;
#ifdef I2_DEBUG
@ -149,10 +145,12 @@ inline void intrusive_ptr_add_ref(Object *object)
inline void intrusive_ptr_release(Object *object)
{
uintptr_t refs;
#ifdef _WIN32
uintptr_t refs = InterlockedDecrement(&object->m_References);
refs = InterlockedDecrement(&object->m_References);
#else /* _WIN32 */
intptr_t refs = __sync_sub_and_fetch(&object->m_References, 1);
refs = __sync_sub_and_fetch(&object->m_References, 1);
#endif /* _WIN32 */
if (refs == 0)