diff options
author | John Hodge <tpg@mutabah.net> | 2018-05-20 12:11:32 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-05-20 12:11:32 +0800 |
commit | 7a4733c76c0391578fe04fde9cfa19698878c81e (patch) | |
tree | ce7c10b66c2e58bbddfa6f389dab8ab29c362c23 /tools/common | |
parent | aa4d3c5fc5f45891411eb72188c5383a23683495 (diff) | |
download | mrust-7a4733c76c0391578fe04fde9cfa19698878c81e.tar.gz |
Minicargo - Quieten build output
Diffstat (limited to 'tools/common')
-rw-r--r-- | tools/common/debug.cpp | 8 | ||||
-rw-r--r-- | tools/common/debug.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/common/debug.cpp b/tools/common/debug.cpp index a3fb9956..94d8ed99 100644 --- a/tools/common/debug.cpp +++ b/tools/common/debug.cpp @@ -34,6 +34,14 @@ void Debug_DisablePhase(const char* phase_name) { gmDisabledDebug.insert( ::std::string(phase_name) ); } +void Debug_EnablePhase(const char* phase_name) +{ + auto it = gmDisabledDebug.find(phase_name); + if( it != gmDisabledDebug.end() ) + { + gmDisabledDebug.erase(it); + } +} void Debug_Print(::std::function<void(::std::ostream& os)> cb) { if( !Debug_IsEnabled() ) diff --git a/tools/common/debug.h b/tools/common/debug.h index ace00876..86c88de9 100644 --- a/tools/common/debug.h +++ b/tools/common/debug.h @@ -7,6 +7,7 @@ typedef ::std::function<void(::std::ostream& os)> dbg_cb_t; extern void Debug_SetPhase(const char* phase_name); extern void Debug_DisablePhase(const char* phase_name); +extern void Debug_EnablePhase(const char* phase_name); extern bool Debug_IsEnabled(); extern void Debug_EnterScope(const char* name, dbg_cb_t ); extern void Debug_LeaveScope(const char* name, dbg_cb_t ); |