From 0af16fae5a93105619083abcc82ac0ffd5d95f03 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Fri, 7 Apr 2017 13:12:12 +0100 Subject: [PATCH 1/2] Include cstdlib to provide access to std::abs for integral types --- include/bounce/common/math/math.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/bounce/common/math/math.h b/include/bounce/common/math/math.h index 17522cb..e8390dc 100644 --- a/include/bounce/common/math/math.h +++ b/include/bounce/common/math/math.h @@ -20,6 +20,7 @@ #define B3_MATH_H #include +#include // For abs() with integral types #include inline bool b3IsValid(float32 fx) From 3dee299ba9b29cffe411c17b04ab5119d78b2d98 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Fri, 7 Apr 2017 13:20:57 +0100 Subject: [PATCH 2/2] Make B3_FORCE_INLINE compatible with non-VC++ compilers --- include/bounce/common/settings.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/bounce/common/settings.h b/include/bounce/common/settings.h index 5caab79..b2c4775 100644 --- a/include/bounce/common/settings.h +++ b/include/bounce/common/settings.h @@ -116,7 +116,13 @@ typedef float float32; #define B3_MiB(n) (1024 * B3_KiB(n)) #define B3_GiB(n) (1024 * B3_MiB(n)) -#define B3_FORCE_INLINE __forceinline +#ifndef _MSC_VER + #ifdef __cplusplus + #define B3_FORCE_INLINE inline + #else + #define B3_FORCE_INLINE + #endif +#endif #define B3_PROFILE(name) b3ProfileScope scope(name)