summaryrefslogtreecommitdiff
path: root/src/include/debug.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-03-13 12:34:13 +0800
committerJohn Hodge <tpg@mutabah.net>2015-03-13 12:34:13 +0800
commit1e77e4894c4355272de8d0bfe391a29d44608604 (patch)
tree7d9db2ba449c296e16d6b27ff2e19f5c3ad40cd3 /src/include/debug.hpp
parent06e7e28cd4de3871f55255150b66821b12365881 (diff)
downloadmrust-1e77e4894c4355272de8d0bfe391a29d44608604.tar.gz
Const items in expressions, attributes in impl blocks
Diffstat (limited to 'src/include/debug.hpp')
-rw-r--r--src/include/debug.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/debug.hpp b/src/include/debug.hpp
index 8376be07..11301d27 100644
--- a/src/include/debug.hpp
+++ b/src/include/debug.hpp
@@ -5,9 +5,15 @@
extern int g_debug_indent_level;
+#ifndef DISABLE_DEBUG
#define INDENT() do { g_debug_indent_level += 1; } while(0)
#define UNINDENT() do { g_debug_indent_level -= 1; } while(0)
#define DEBUG(ss) do{ if(debug_enabled()) { debug_output(g_debug_indent_level, __FUNCTION__) << ss << ::std::endl; } } while(0)
+#else
+#define INDENT() do { } while(0)
+#define UNINDENT() do {} while(0)
+#define DEBUG(ss) do{ } while(0)
+#endif
extern bool debug_enabled();
extern ::std::ostream& debug_output(int indent, const char* function);