aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPjotr Prins2017-11-09 09:05:13 +0000
committerPjotr Prins2017-11-09 09:05:13 +0000
commit09be8f791f8c2d9f7eb5ef5b2f67922c79862024 (patch)
treeb9a3f3e9b4d26f2e26c321df3208ed3cde81e810 /src
parent04e8eab1c328b008c70308eebd9c6b12932ec2b5 (diff)
downloadpangemma-09be8f791f8c2d9f7eb5ef5b2f67922c79862024.tar.gz
Disabled debug output when not using -debug
Diffstat (limited to 'src')
-rw-r--r--src/debug.cpp2
-rw-r--r--src/debug.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 82d2be0..d133344 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -22,7 +22,7 @@ static bool debug_mode = false;
static bool debug_check = true; // check data/algorithms
static bool debug_strict = false; // fail on error
static bool debug_quiet = false;
-static uint debug_issue = 0; // github issues
+static uint debug_issue = 0; // track github issues
static bool debug_legacy = false; // legacy mode
void debug_set_debug_mode(bool setting) { debug_mode = setting; }
diff --git a/src/debug.h b/src/debug.h
index b3ec17b..29f6c69 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -77,7 +77,7 @@ inline void fail_msg(std::string msg) {
#else // DEBUG
#define warning_msg(msg) cerr << "**** WARNING: " << msg << " in " << __FILE__ << " at line " << __LINE__ << " in " << __FUNCTION__ << endl;
-#define debug_msg(msg) cerr << "**** DEBUG: " << msg << " in " << __FILE__ << " at line " << __LINE__ << " in " << __FUNCTION__ << endl;
+#define debug_msg(msg) (is_debug_mode() && cerr << "**** DEBUG: " << msg << " in " << __FILE__ << " at line " << __LINE__ << " in " << __FUNCTION__ << endl);
#define assert_issue(is_issue, expr) \
((is_issue) ? enforce_msg(expr,"FAIL: ISSUE assert") : __ASSERT_VOID_CAST(0))