From 352e3c2daae235ff4198f1084232be199114c235 Mon Sep 17 00:00:00 2001 From: Tobias Loose Date: Sat, 23 Nov 2013 16:03:04 +0100 Subject: [PATCH] Remove makros and add undefs to avoid clashing names FRAND and Clamp were not used and Clamp collided when doing unit builds. SQUARE(x) is longer than x*x and if x is an expression it gets evaluated twice. --- JGE/include/JGE.h | 11 +++++++++++ JGE/include/Vector3D.h | 11 +---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/JGE/include/JGE.h b/JGE/include/JGE.h index 8168821f3..80a2e3717 100644 --- a/JGE/include/JGE.h +++ b/JGE/include/JGE.h @@ -44,6 +44,17 @@ typedef WPARAM LocalKeySym; #include typedef KeySym LocalKeySym; #define LOCAL_KEY_NONE XK_VoidSymbol +#undef Status +#undef Bool +#undef None +#undef CursorShape +#undef KeyPress +#undef KeyRelease +#undef FocusIn +#undef FocusOut +#undef FontChange +#undef Unsorted +#undef GrayScale #elif defined(ANDROID) // This is temporary until we understand how to send real key events from Java typedef long unsigned int LocalKeySym; diff --git a/JGE/include/Vector3D.h b/JGE/include/Vector3D.h index 573af33ca..aa207353b 100644 --- a/JGE/include/Vector3D.h +++ b/JGE/include/Vector3D.h @@ -3,15 +3,6 @@ #include - -/*************************** Macros and constants ***************************/ -// returns a number ranging from -1.0 to 1.0 -#define FRAND (((float)rand()-(float)rand())/RAND_MAX) -#define Clamp(x, min, max) x = (x