From 886650a038f610081d9fe420f64d23d89b9a139c Mon Sep 17 00:00:00 2001 From: "erwin.coumans@gmail.com" Date: Sun, 17 Nov 2013 20:13:50 +0000 Subject: [PATCH] fix 'unused' warning. Fixes Issue 770 --- src/LinearMath/btScalar.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h index 37c6dec19..225d49f3f 100644 --- a/src/LinearMath/btScalar.h +++ b/src/LinearMath/btScalar.h @@ -284,6 +284,10 @@ static int btNanMask = 0x7F800001; #ifndef BT_INFINITY static int btInfinityMask = 0x7F800000; #define BT_INFINITY (*(float*)&btInfinityMask) +inline int btGetInfinityMask()//suppress stupid compiler warning +{ + return btInfinityMask; +} #endif //use this, in case there are clashes (such as xnamath.h) @@ -336,6 +340,10 @@ inline __m128 operator * (const __m128 A, const __m128 B) #ifndef BT_INFINITY static int btInfinityMask = 0x7F800000; #define BT_INFINITY (*(float*)&btInfinityMask) + inline int btGetInfinityMask()//suppress stupid compiler warning + { + return btInfinityMask; + } #endif #endif//BT_USE_NEON @@ -728,4 +736,5 @@ template T* btAlignPointer(T* unalignedPtr, size_t alignment) return converter.ptr; } + #endif //BT_SCALAR_H