diff options
author | Max Horn | 2010-11-01 20:41:32 +0000 |
---|---|---|
committer | Max Horn | 2010-11-01 20:41:32 +0000 |
commit | 75c6e668744a092e5e2101c5a0c2482b3f4cc949 (patch) | |
tree | a78d597ca3055d3e0be05c70f16790846539ecea /common | |
parent | ebb7ed2b8a5118289f3fa5383fdf88fa370abb0c (diff) | |
download | scummvm-rg350-75c6e668744a092e5e2101c5a0c2482b3f4cc949.tar.gz scummvm-rg350-75c6e668744a092e5e2101c5a0c2482b3f4cc949.tar.bz2 scummvm-rg350-75c6e668744a092e5e2101c5a0c2482b3f4cc949.zip |
COMMON: Get rid of the debug() output formatter
Now Engine::errorString is only used by error(), as its name suggests.
This also resolves the inconsistency between debug & debugN.
svn-id: r54023
Diffstat (limited to 'common')
-rw-r--r-- | common/debug.cpp | 18 | ||||
-rw-r--r-- | common/debug.h | 12 |
2 files changed, 1 insertions, 29 deletions
diff --git a/common/debug.cpp b/common/debug.cpp index b718b7917f..46f8e8b829 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -123,31 +123,15 @@ bool DebugManager::isDebugChannelEnabled(uint32 channel) { return (gDebugChannelsEnabled & channel) != 0; } - - -static OutputFormatter s_debugOutputFormatter = 0; - -void setDebugOutputFormatter(OutputFormatter f) { - s_debugOutputFormatter = f; -} - } // End of namespace Common #ifndef DISABLE_TEXT_CONSOLE static void debugHelper(const char *s, va_list va, bool caret = true) { - char in_buf[STRINGBUFLEN]; char buf[STRINGBUFLEN]; - vsnprintf(in_buf, STRINGBUFLEN, s, va); - // Next, give the active engine (if any) a chance to augment the message, - // but only if not used from debugN. - if (caret && Common::s_debugOutputFormatter) { - (*Common::s_debugOutputFormatter)(buf, in_buf, STRINGBUFLEN); - } else { - strncpy(buf, in_buf, STRINGBUFLEN); - } + vsnprintf(buf, STRINGBUFLEN, s, va); buf[STRINGBUFLEN-1] = '\0'; if (caret) { diff --git a/common/debug.h b/common/debug.h index 06f897f103..03de7f4f77 100644 --- a/common/debug.h +++ b/common/debug.h @@ -26,18 +26,6 @@ #define COMMON_DEBUG_H #include "common/scummsys.h" -#include "common/textconsole.h" - -namespace Common { - -/** - * Set the output formatter used by debug() and related functions. - */ -void setDebugOutputFormatter(OutputFormatter f); - - -} // End of namespace Common - #ifdef DISABLE_TEXT_CONSOLE |