Browse Source

Fix b2Assert location and fix isfinite missing

Garrett Brown 4 years ago
parent
commit
dd445ed182

+ 2 - 1
src/libraries/box2d/b2_common.h

@@ -34,7 +34,8 @@
 #endif
 #endif
 
 
 #define B2_NOT_USED(x) ((void)(x))
 #define B2_NOT_USED(x) ((void)(x))
-#define b2Assert(A) assert(A)
+void loveAssert(bool test, const char* teststr);
+#define b2Assert(A) loveAssert((A), #A)
 
 
 #define	b2_maxFloat		FLT_MAX
 #define	b2_maxFloat		FLT_MAX
 #define	b2_epsilon		FLT_EPSILON
 #define	b2_epsilon		FLT_EPSILON

+ 1 - 0
src/libraries/box2d/b2_math.h

@@ -24,6 +24,7 @@
 #define B2_MATH_H
 #define B2_MATH_H
 
 
 #include <math.h>
 #include <math.h>
+#include <cmath>
 
 
 #include "b2_api.h"
 #include "b2_api.h"
 #include "b2_settings.h"
 #include "b2_settings.h"

+ 0 - 3
src/libraries/box2d/b2_settings.h

@@ -122,9 +122,6 @@ inline void b2Log(const char* string, ...)
 
 
 #endif // B2_USER_SETTINGS
 #endif // B2_USER_SETTINGS
 
 
-void loveAssert(bool test, const char* teststr);
-#define b2Assert(A) loveAssert((A), #A)
-
 #include "b2_common.h"
 #include "b2_common.h"
 
 
 #endif
 #endif