From 2ac86edf6c9f9aa8559b265c2121581006f09eae Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 22 Jun 2019 15:46:07 +0800 Subject: HIR Deserialise - Disable debug output --- src/debug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/debug.cpp') diff --git a/src/debug.cpp b/src/debug.cpp index 43e2795e..8a0d1f3c 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -11,7 +11,7 @@ TraceLog::TraceLog(const char* tag, ::std::function info_ m_tag(tag), m_ret(ret) { - if(debug_enabled()) { + if(debug_enabled() && m_tag) { auto& os = debug_output(g_debug_indent_level, m_tag); os << ">> ("; info_cb(os); @@ -23,7 +23,7 @@ TraceLog::TraceLog(const char* tag, ::std::function info_ m_tag(tag), m_ret([](const auto&){}) { - if(debug_enabled()) { + if(debug_enabled() && m_tag) { auto& os = debug_output(g_debug_indent_level, m_tag); os << ">> ("; info_cb(os); @@ -35,7 +35,7 @@ TraceLog::TraceLog(const char* tag): m_tag(tag), m_ret([](const auto&){}) { - if(debug_enabled()) { + if(debug_enabled() && m_tag) { auto& os = debug_output(g_debug_indent_level, m_tag); os << ">>" << ::std::endl; } @@ -43,7 +43,7 @@ TraceLog::TraceLog(const char* tag): } TraceLog::~TraceLog() { UNINDENT(); - if(debug_enabled()) { + if(debug_enabled() && m_tag) { auto& os = debug_output(g_debug_indent_level, m_tag); os << "<< ("; m_ret(os); -- cgit v1.2.3