Build fix

fixes #11096
This commit is contained in:
Gunnar Beutner 2016-02-09 13:56:17 +01:00
parent 9e7da9837e
commit 674badd3ce
1 changed files with 3 additions and 4 deletions

View File

@ -117,7 +117,7 @@ private:
Object(const Object& other);
Object& operator=(const Object& rhs);
intptr_t m_References;
uintptr_t m_References;
mutable uintptr_t m_Mutex;
#ifdef I2_DEBUG
@ -153,15 +153,14 @@ inline void intrusive_ptr_add_ref(Object *object)
inline void intrusive_ptr_release(Object *object)
{
intptr_t refs;
uintptr_t refs;
#ifdef _WIN32
refs = InterlockedDecrement(&object->m_References);
#else /* _WIN32 */
refs = __sync_sub_and_fetch(&object->m_References, 1);
#endif /* _WIN32 */
ASSERT(refs >= 0);
if (refs == 0) {
#ifdef I2_LEAK_DEBUG
TypeRemoveObject(object);