[Tizen] Add codes for Dali Windows Backend
[platform/core/uifw/dali-core.git] / dali / public-api / object / ref-object.cpp
index 3060f4b..6ed98ba 100644 (file)
@@ -101,8 +101,7 @@ void RefObject::Reference()
 
 #else
 
-  // gcc > 4.1 builtin atomic add and fetch:
-  __sync_add_and_fetch( &mCount, 1 );
+  std::atomic_fetch_add<int>(&mCount, 1);
 
 #endif
 }
@@ -150,8 +149,7 @@ void RefObject::Unreference()
 
 #else
 
-  // gcc > 4.1 builtin atomic subtract and fetch (--mCount; return mCount)
-  newValue = __sync_sub_and_fetch( &mCount, 1 );
+  newValue = ( mCount -= 1 );
 
 #endif