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
This commit is contained in:
Max Horn 2010-11-01 20:41:32 +00:00
parent ebb7ed2b8a
commit 75c6e66874
3 changed files with 1 additions and 30 deletions

View file

@ -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) {