From 04816a4c82395cf1195d7f6ae4666f746a35d401 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 16 Feb 2011 18:11:21 +0100 Subject: [PATCH] reinterpret_cast is needed --- include/mitsuba/core/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mitsuba/core/atomic.h b/include/mitsuba/core/atomic.h index 9bac4057..b8ca9a06 100644 --- a/include/mitsuba/core/atomic.h +++ b/include/mitsuba/core/atomic.h @@ -122,7 +122,7 @@ inline double atomicAdd(volatile double *dst, double delta) { inline int32_t atomicAdd(volatile int32_t *dst, int32_t delta) { #if defined(WIN32) - return InterlockedExchangeAdd(dst, delta) + delta; + return InterlockedExchangeAdd(reinterpret_cast(dst), delta) + delta; #else return __sync_add_and_fetch(dst, delta); #endif @@ -136,7 +136,7 @@ inline int32_t atomicAdd(volatile int32_t *dst, int32_t delta) { inline int64_t atomicAdd(volatile int64_t *dst, int64_t delta) { #if defined(WIN64) - return _InterlockedExchangeAdd64(dst, delta) + delta; + return _InterlockedExchangeAdd64(reinterpret_cast(dst), delta) + delta; #elif defined(WIN32) SLog(EError, "atomicAdd() cannot handle 64-bit integers on WIN32"); return 0;