diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-11-02 11:07:23 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-11-02 11:07:23 +0800 |
commit | 1d02810c3cf908bfba7c15ae50eb5314603b9d85 (patch) | |
tree | 79dd5e4ef4c3ff79db0912ba546f08e61a7a8c10 /src/debug.cpp | |
parent | 7111acba04d72fe4084b1a1f3209ff83efe8614d (diff) | |
parent | 8b53b38f40625ab0510f541d69db3f83332a830a (diff) | |
download | mrust-1d02810c3cf908bfba7c15ae50eb5314603b9d85.tar.gz |
Merge branch 'nightly-1.29' - #95 Working support for rustc 1.29
Diffstat (limited to 'src/debug.cpp')
-rw-r--r-- | src/debug.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<void(::std::ostream&)> 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<void(::std::ostream&)> 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); |