summaryrefslogtreecommitdiffstats
path: root/source/Globals.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-04 17:29:45 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-04 17:29:45 +0200
commitb379f35f4f09ef8241d109419238cbac6e036bbd (patch)
tree8c31b9f88257ab9b3b812555e77374cf6b0df99e /source/Globals.h
parentFixed FS #243, server crash after restart. The blockhandler table and the itemhandler table weren't properly re-initialized. (diff)
downloadcuberite-b379f35f4f09ef8241d109419238cbac6e036bbd.tar
cuberite-b379f35f4f09ef8241d109419238cbac6e036bbd.tar.gz
cuberite-b379f35f4f09ef8241d109419238cbac6e036bbd.tar.bz2
cuberite-b379f35f4f09ef8241d109419238cbac6e036bbd.tar.lz
cuberite-b379f35f4f09ef8241d109419238cbac6e036bbd.tar.xz
cuberite-b379f35f4f09ef8241d109419238cbac6e036bbd.tar.zst
cuberite-b379f35f4f09ef8241d109419238cbac6e036bbd.zip
Diffstat (limited to 'source/Globals.h')
-rw-r--r--source/Globals.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/Globals.h b/source/Globals.h
index 9ea0825c1..1a4a361ee 100644
--- a/source/Globals.h
+++ b/source/Globals.h
@@ -187,10 +187,10 @@ typedef short Int16;
#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
- #define ASSERT(x) ((void)0)
-#else
+#ifdef _DEBUG
#define ASSERT( x ) ( !!(x) || ( LOGERROR("Assertion failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), assert(0), 0 ) )
+#else
+ #define ASSERT(x) ((void)0)
#endif
// Pretty much the same as ASSERT() but stays in Release builds