From c67c2b7435a13d7ce17b2075e22dc5c6036f702a Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 4 Feb 2013 00:49:50 -0800 Subject: Remove some more Skill-related stuff --- src/common/nullpo.hpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/common/nullpo.hpp') 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 -- cgit v1.2.3-60-g2f50