diff options
Diffstat (limited to 'src/Globals.h')
-rw-r--r-- | src/Globals.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Globals.h b/src/Globals.h index e907614d7..faa168c59 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -41,6 +41,9 @@ #define FORMATSTRING(formatIndex,va_argsIndex) + // MSVC has its own custom version of zu format + #define SIZE_T_FMT "%Iu" + #elif defined(__GNUC__) // TODO: Can GCC explicitly mark classes as abstract (no instances can be created)? @@ -61,6 +64,8 @@ #define FORMATSTRING(formatIndex,va_argsIndex) __attribute__((format (printf, formatIndex, va_argsIndex))) + #define SIZE_T_FMT "%zu" + #else #error "You are using an unsupported compiler, you might need to #define some stuff here for your compiler" @@ -240,7 +245,7 @@ template class SizeChecker<UInt16, 2>; // 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 @@ -265,6 +270,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" |