summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-04 22:12:01 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-04 22:12:01 +0300
commitbf9c58df65f48416dd7ae02cae96228ab6bec6d4 (patch)
treee1a8810a30f68f961099394b3c5fbf2613f8cfcb /src
parent62813629db182aa7098c6ab6fe63c304c2c729b0 (diff)
downloadmanaverse-bf9c58df65f48416dd7ae02cae96228ab6bec6d4.tar.gz
manaverse-bf9c58df65f48416dd7ae02cae96228ab6bec6d4.tar.bz2
manaverse-bf9c58df65f48416dd7ae02cae96228ab6bec6d4.tar.xz
manaverse-bf9c58df65f48416dd7ae02cae96228ab6bec6d4.zip
Fix returnTrue/returnFalse macroses if asserts disabled.
Diffstat (limited to 'src')
-rw-r--r--src/utils/checkutils.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/utils/checkutils.h b/src/utils/checkutils.h
index 9617ca140..7b76da8f1 100644
--- a/src/utils/checkutils.h
+++ b/src/utils/checkutils.h
@@ -85,10 +85,22 @@ void reportStack(const char *const file,
#define reportTrue(val) (val)
#define failFalse(val) (val)
#define failTrue(val) (val)
-#define returnTrueV(val)
-#define returnFalseV(val)
-#define returnTrue(val)
-#define returnFalse(val)
+
+#define returnFalseV(val) \
+ if (!val) \
+ return;
+
+#define returnTrueV(val) \
+ if (val) \
+ return;
+
+#define returnFalse(ret, val) \
+ if (!val) \
+ return ret;
+
+#define returnTrue(ret, val) \
+ if (val) \
+ return ret;
#endif // ENABLE_ASSERTS
#endif // UTILS_CHECKUTILS_H