From 54638e6d59715fdf27a01c3136be25434bfb7c9f Mon Sep 17 00:00:00 2001 From: Iain Merrick Date: Tue, 26 Sep 2017 11:55:37 -0500 Subject: [PATCH 1/2] Fix C++11 warning - left shift of signed value is undefined --- liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.cpp b/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.cpp index 2088aed2c..6ba4e8c6d 100644 --- a/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.cpp +++ b/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.cpp @@ -52,7 +52,7 @@ static const uint32 yMask = ((1u << yTruncBits) - 1u) << yShift; static const uint32 xMask = ~yMask; static const uint32 relativeTagRight = 1u << xShift; static const uint32 relativeTagBottomLeft = (uint32)((1 << yShift) + - (-1 << xShift)); + ((~uint32(0)) << xShift)); static const uint32 relativeTagBottomRight = (1u << yShift) + (1u << xShift); From 258dd34554651dbefe1b5ec89bc49286ad096454 Mon Sep 17 00:00:00 2001 From: Iain Merrick Date: Wed, 4 Oct 2017 15:53:38 -0500 Subject: [PATCH 2/2] Fix preprocessor warning - #if of undefined variable --- liquidfun/Box2D/Box2D/Common/b2Settings.h | 2 +- liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/liquidfun/Box2D/Box2D/Common/b2Settings.h b/liquidfun/Box2D/Box2D/Common/b2Settings.h index f073670d8..268520d7a 100644 --- a/liquidfun/Box2D/Box2D/Common/b2Settings.h +++ b/liquidfun/Box2D/Box2D/Common/b2Settings.h @@ -75,7 +75,7 @@ typedef unsigned long long uint64; // We expand the API so that other languages (e.g. Java) can call into // our C++ more easily. Only set if when the flag is not externally defined. #if !defined(LIQUIDFUN_EXTERNAL_LANGUAGE_API) -#if SWIG || LIQUIDFUN_UNIT_TESTS +#if defined(SWIG) || defined(LIQUIDFUN_UNIT_TESTS) #define LIQUIDFUN_EXTERNAL_LANGUAGE_API 1 #else #define LIQUIDFUN_EXTERNAL_LANGUAGE_API 0 diff --git a/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.h b/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.h index fc27419f4..d77057fd0 100644 --- a/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.h +++ b/liquidfun/Box2D/Box2D/Particle/b2ParticleSystem.h @@ -23,7 +23,7 @@ #include #include -#if LIQUIDFUN_UNIT_TESTS +#ifdef LIQUIDFUN_UNIT_TESTS #include #endif // LIQUIDFUN_UNIT_TESTS