diff options
author | Alexander Lyons Harkness <me@bearbin.net> | 2017-12-23 13:49:08 +0100 |
---|---|---|
committer | Alexander Lyons Harkness <me@bearbin.net> | 2017-12-24 15:23:23 +0100 |
commit | 1926181cb7c8570fe57ec1b39d4241b9dd156333 (patch) | |
tree | 8ac9c6f24285846fa3f97f0a4ade9b0f9996f295 /Tools/RCONClient/Globals.h | |
parent | Fixed item ID raw rabbit (#4103) (diff) | |
download | cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.gz cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.bz2 cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.lz cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.xz cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.zst cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.zip |
Diffstat (limited to 'Tools/RCONClient/Globals.h')
-rw-r--r-- | Tools/RCONClient/Globals.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/RCONClient/Globals.h b/Tools/RCONClient/Globals.h index b9b1519e3..e025377dd 100644 --- a/Tools/RCONClient/Globals.h +++ b/Tools/RCONClient/Globals.h @@ -218,14 +218,14 @@ typedef unsigned char Byte; // Common definitions: -/// Evaluates to the number of elements in an array (compile-time!) +/** Evaluates to the number of elements in an array (compile-time!) */ #define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X))) -/// Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)" ) +/** Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)") */ #define KiB * 1024 -/// Faster than (int)floorf((float)x / (float)div) -#define FAST_FLOOR_DIV( x, div ) ( (x) < 0 ? (((int)x / div) - 1) : ((int)x / div) ) +/** Faster than (int)floorf((float)x / (float)div) */ +#define FAST_FLOOR_DIV(x, div) ((x) < 0 ? (((int)x / div) - 1) : ((int)x / div)) // Own version of assert() that writes failed assertions to the log for review #ifdef NDEBUG @@ -235,4 +235,4 @@ typedef unsigned char Byte; #endif // Pretty much the same as ASSERT() but stays in Release builds -#define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) ) +#define VERIFY(x) (!!(x) || (LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__), exit(1), 0)) |