diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-02-04 00:49:50 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-02-07 12:54:23 -0800 |
commit | c67c2b7435a13d7ce17b2075e22dc5c6036f702a (patch) | |
tree | b84b7b205a361b39d65944a9edb2a353356a9ac9 /src/common/nullpo.hpp | |
parent | b3a0b3e7c94bce46bc0654528df0748cf0c2a6ac (diff) | |
download | tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.tar.gz tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.tar.bz2 tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.tar.xz tmwa-c67c2b7435a13d7ce17b2075e22dc5c6036f702a.zip |
Remove some more Skill-related stuff
Diffstat (limited to 'src/common/nullpo.hpp')
-rw-r--r-- | src/common/nullpo.hpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/common/nullpo.hpp b/src/common/nullpo.hpp index ad1084a..2d8644f 100644 --- a/src/common/nullpo.hpp +++ b/src/common/nullpo.hpp @@ -1,22 +1,22 @@ /// return wrappers for unexpected NULL pointers #ifndef NULLPO_HPP #define NULLPO_HPP -/// Comment this out to live dangerously -# define NULLPO_CHECK +/// Uncomment this to live dangerously +/// (really exist to detect mostly-unused variables) +//# define BUG_FREE /// All functions print to standard error (was: standard output) /// nullpo_ret(cond) - return 0 if given pointer is NULL /// nullpo_retv(cond) - just return (function returns void) /// nullpo_retr(rv, cond) - return given value instead -# ifdef NULLPO_CHECK -# define NLP_MARK __FILE__, __LINE__, __func__ +# ifndef BUG_FREE # define nullpo_retr(ret, t) \ - if (nullpo_chk(NLP_MARK, t)) \ + if (nullpo_chk(__FILE__, __LINE__, __func__, t)) \ return ret; -# else // NULLPO_CHECK -# define nullpo_retr(ret, t) t; -# endif // NULLPO_CHECK +# else // BUG_FREE +# define nullpo_retr(ret, t) /*t*/ +# endif // BUG_FREE # define nullpo_ret(t) nullpo_retr(0, t) # define nullpo_retv(t) nullpo_retr(, t) @@ -27,7 +27,4 @@ bool nullpo_chk(const char *file, int line, const char *func, const void *target); -/// Used only by map/battle.c -void nullpo_info(const char *file, int line, const char *func); - #endif // NULLPO_HPP |