memcpy( mBuffer[index], src, size );
// unset WRITING bit, set UPDATED bit
- BufferState checkState = __sync_val_compare_and_swap( &mState, (currentState | WRITING), (index | UPDATED) );
+ BufferState checkState = __sync_val_compare_and_swap( &mState,
+ static_cast<BufferState>(currentState | WRITING),
+ static_cast<BufferState>(index | UPDATED) );
DALI_ASSERT_DEBUG( checkState & WRITING );
(void)checkState; // Avoid unused variable warning
{
// Try to swap buffers.
// This will set mState to 1 if readbuffer 0 was updated, 0 if readbuffer 1 was updated and fail if WRITING is set
- if( __sync_bool_compare_and_swap( &mState, currentWriteBuf | UPDATED, !currentWriteBuf ) )
+ if( __sync_bool_compare_and_swap( &mState,
+ static_cast<BufferState>(currentWriteBuf | UPDATED),
+ static_cast<BufferState>(!currentWriteBuf) ) )
{
// swap successful
return mBuffer[currentWriteBuf];