summaryrefslogtreecommitdiff
path: root/src/common/include/gudhi/Debug_utils.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-18 12:03:43 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-11-18 12:03:43 +0000
commitfe78c077b00e91b3d316f1d64541008a615664e7 (patch)
treea85cbd9780d5b9d2640609f349c7601626390313 /src/common/include/gudhi/Debug_utils.h
parentc972b77524faec5d6f297d442539f65b9351654e (diff)
rev911 rollback
code review fix fix prune_above_filtration removing every simplices git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@927 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1660da972bd5198214a0f0384be9be66a5312e74
Diffstat (limited to 'src/common/include/gudhi/Debug_utils.h')
-rw-r--r--src/common/include/gudhi/Debug_utils.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/common/include/gudhi/Debug_utils.h b/src/common/include/gudhi/Debug_utils.h
index c479d435..48d61fef 100644
--- a/src/common/include/gudhi/Debug_utils.h
+++ b/src/common/include/gudhi/Debug_utils.h
@@ -24,14 +24,23 @@
#include <iostream>
-#ifdef NDEBUG
- // GUDHI_NDEBUG is the Gudhi official flag for debug mode.
- #define GUDHI_NDEBUG
+#ifndef NDEBUG
+ // GUDHI_DEBUG is the Gudhi official flag for debug mode.
+ #define GUDHI_DEBUG
+#endif
+
+// GUDHI_CHECK throw an exception on condition 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
+#else
+ #define GUDHI_CHECK(cond, excpt) (void) 0
#endif
#define PRINT(a) std::cerr << #a << ": " << (a) << " (DISP)" << std::endl
-#ifdef GUDHI_NDEBUG
+// #define DBG_VERBOSE
+#ifdef DBG_VERBOSE
#define DBG(a) std::cout << "DBG: " << (a) << std::endl
#define DBGMSG(a, b) std::cout << "DBG: " << a << b << std::endl
#define DBGVALUE(a) std::cout << "DBG: " << #a << ": " << a << std::endl
@@ -43,11 +52,4 @@
#define DBGCONT(a) (void) 0
#endif
-// GUDHI_CHECK throw an exception on condition in debug mode, but does nothing in release mode
-#ifdef GUDHI_NDEBUG
- #define GUDHI_CHECK(cond, excpt) if (cond) throw excpt
-#else
- #define GUDHI_CHECK(cond, excpt) (void) 0
-#endif
-
#endif // DEBUG_UTILS_H_