From 5276b0a9e344ed0bb4fdb8b079f2ce86649d12a4 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 22 Mar 2016 16:07:08 +0000 Subject: GUDHI_CHECK was not intuitive. Reverse GUDHI_CHECK calls. No exception when no point is given in contrction. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@1070 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: bf6a08d48b5b29a5b24bf5107116e399dfc0a6bc --- src/common/include/gudhi/Debug_utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/include') diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h index 48d61fef..7573a9db 100644 --- a/src/common/include/gudhi/Debug_utils.h +++ b/src/common/include/gudhi/Debug_utils.h @@ -29,12 +29,12 @@ #define GUDHI_DEBUG #endif -// GUDHI_CHECK throw an exception on condition in debug mode, but does nothing in release mode +// GUDHI_CHECK throw an exception if expression is false in debug mode, but does nothing in release mode // Could assert in release mode, but cmake sets NDEBUG (for "NO DEBUG") in this mode, means assert does nothing. #ifdef GUDHI_DEBUG - #define GUDHI_CHECK(cond, excpt) if (cond) throw excpt + #define GUDHI_CHECK(expression, excpt) if ((expression) == 0) throw excpt #else - #define GUDHI_CHECK(cond, excpt) (void) 0 + #define GUDHI_CHECK(expression, excpt) (void) 0 #endif #define PRINT(a) std::cerr << #a << ": " << (a) << " (DISP)" << std::endl -- cgit v1.2.3