diff --git a/debug.hpp b/debug.hpp index 564ac93b..87ac774f 100644 --- a/debug.hpp +++ b/debug.hpp @@ -126,11 +126,15 @@ /////////////////////////////////////////////////////////////////////////////// -#define CHECK_SANITY(A) \ -::util::debug::scoped_sanity PASTE(__scoped_sanity_checker,__LINE__) (A); \ +#define SCOPED_SANITY(A) \ +::util::debug::scoped_sanity PASTE(__scoped_sanity_checker,__LINE__) ((A)); \ (void)PASTE(__scoped_sanity_checker,__LINE__); +/////////////////////////////////////////////////////////////////////////////// +#define CHECK_SANITY(A) CHECK(::util::debug::is_valid ((A))) + + /////////////////////////////////////////////////////////////////////////////// #define CHECK_EQ(A,B) do { \ DEBUG_ONLY ( \