#else
- // gcc > 4.1 builtin atomic add and fetch:
- __sync_add_and_fetch( &mCount, 1 );
+ std::atomic_fetch_add<int>(&mCount, 1);
#endif
}
#else
- // gcc > 4.1 builtin atomic subtract and fetch (--mCount; return mCount)
- newValue = __sync_sub_and_fetch( &mCount, 1 );
+ newValue = ( mCount -= 1 );
#endif