From bacf3272464684e4e9f4bd5ca60a0474c6cd6a39 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Wed, 6 Mar 2013 19:57:20 -0500 Subject: [PATCH] Fix MSVC compiler errors with the atomics --- BPTCEncoder/src/BC7Compressor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BPTCEncoder/src/BC7Compressor.cpp b/BPTCEncoder/src/BC7Compressor.cpp index 61e8eed..af73a18 100755 --- a/BPTCEncoder/src/BC7Compressor.cpp +++ b/BPTCEncoder/src/BC7Compressor.cpp @@ -1538,10 +1538,10 @@ namespace BC7C } static uint32 FetchAndAdd(uint32 *x) { - return InterlockedIncrement(x); + return InterlockedIncrement(x)-1; } - static void ResetTestAndSet(uint *x) { + static void ResetTestAndSet(uint32 *x) { *x = 0; } #elif defined HAS_GCC_ATOMICS