From b4bf13aa4f004a7819e262679a295d8ca886557b Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 11 Mar 2014 16:01:17 +0200 Subject: Unified Vector classes --- src/Globals.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 28805a83f..b8acfca64 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -246,6 +246,14 @@ T Clamp(T a_Value, T a_Min, T a_Max) +#ifndef TOLUA_TEMPLATE_BIND +#define TOLUA_TEMPLATE_BIND(x) +#endif + + + + + // Common headers (part 2, with macros): #include "ChunkDef.h" #include "BiomeDef.h" -- cgit v1.2.3 From ef58b0eb54c700800597031c37c3e76fef87cdfb Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 12 Mar 2014 09:49:37 -0700 Subject: Fixed comments an assert --- src/Globals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 2cd160677..6661aa476 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -236,7 +236,7 @@ template class SizeChecker; // Same as assert but in all Self test builds #ifdef SELF_TEST -#define assert_test(x) ( !!(x) || (assert(0), exit(1), 0)) +#define assert_test(x) ( !!(x) || (assert(!#x), exit(1), 0)) #endif /// A generic interface used mainly in ForEach() functions -- cgit v1.2.3 From a584b7b3bc95783025d9861964bd987f324ba981 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 12 Mar 2014 10:09:08 -0700 Subject: Fixed printf format compatabilty --- src/Globals.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 5ced0cc39..b42a06970 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -38,6 +38,9 @@ // No alignment needed in MSVC #define ALIGN_8 #define ALIGN_16 + + // MSVC has its own custom version of zu format + #define SIZE_T_FMT "%Iu" #elif defined(__GNUC__) @@ -56,6 +59,8 @@ // Some portability macros :) #define stricmp strcasecmp + + #define SIZE_T_FMT "%zu" #else -- cgit v1.2.3