From 3f15e07562084594597d1fc81005ad55aea33b70 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Oct 2015 22:26:28 -0400 Subject: [PATCH] [Glide64] fixed a pre-processor macro language collision --- Source/Glide64/Main.cpp | 2 +- Source/Glide64/rdp.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/Glide64/Main.cpp b/Source/Glide64/Main.cpp index 07a8ecd04..36eef0d3e 100644 --- a/Source/Glide64/Main.cpp +++ b/Source/Glide64/Main.cpp @@ -37,9 +37,9 @@ // //**************************************************************** +#include #include "Gfx_1.3.h" #include "Version.h" -#include #include #include diff --git a/Source/Glide64/rdp.h b/Source/Glide64/rdp.h index 9dfa8d7b0..64d6e7804 100644 --- a/Source/Glide64/rdp.h +++ b/Source/Glide64/rdp.h @@ -830,12 +830,20 @@ extern const char *CIStatus[]; #define FBL_D_1 2 #define FBL_D_0 3 +/* + * taken straight from MSVC in case of other compilers + * + * Careful! These macros can sabotage std::max and std::min from . + * The only solution is to include first, before or + * before defining the below macros (or just don't use ). + */ #ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define max(a, b) (((a) > (b)) ? (a) : (b)) #endif #ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) +#define min(a, b) (((a) < (b)) ? (a) : (b)) #endif + #ifndef TRUE #define TRUE 1 #endif