mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Revert "Windows build fix"
This reverts commit f06f6d4d86bf221b83520e61833e272c0b1e694f.
This commit is contained in:
parent
90e241ca85
commit
9e7da9837e
@ -117,11 +117,7 @@ private:
|
|||||||
Object(const Object& other);
|
Object(const Object& other);
|
||||||
Object& operator=(const Object& rhs);
|
Object& operator=(const Object& rhs);
|
||||||
|
|
||||||
# ifndef _WIN32
|
|
||||||
intptr_t m_References;
|
intptr_t m_References;
|
||||||
# else /* _WIN32 */
|
|
||||||
uintptr_t m_References;
|
|
||||||
# endif /* _WIN32 */
|
|
||||||
mutable uintptr_t m_Mutex;
|
mutable uintptr_t m_Mutex;
|
||||||
|
|
||||||
#ifdef I2_DEBUG
|
#ifdef I2_DEBUG
|
||||||
@ -157,10 +153,11 @@ inline void intrusive_ptr_add_ref(Object *object)
|
|||||||
|
|
||||||
inline void intrusive_ptr_release(Object *object)
|
inline void intrusive_ptr_release(Object *object)
|
||||||
{
|
{
|
||||||
|
intptr_t refs;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
uintptr_t refs = InterlockedDecrement(&object->m_References);
|
refs = InterlockedDecrement(&object->m_References);
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
intptr_t refs = __sync_sub_and_fetch(&object->m_References, 1);
|
refs = __sync_sub_and_fetch(&object->m_References, 1);
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
ASSERT(refs >= 0);
|
ASSERT(refs >= 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user