mirror of https://github.com/OpenTTD/OpenTTD
Codechange: remove single use IConsoleDebug
parent
6b757c716a
commit
121b037054
|
@ -144,20 +144,6 @@ void CDECL IConsolePrintF(TextColour colour_code, const char *format, ...)
|
||||||
IConsolePrint(colour_code, buf);
|
IConsolePrint(colour_code, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* It is possible to print debugging information to the console,
|
|
||||||
* which is achieved by using this function. Can only be used by
|
|
||||||
* debug() in debug.cpp. You need at least a level 2 (developer) for debugging
|
|
||||||
* messages to show up
|
|
||||||
* @param dbg debugging category
|
|
||||||
* @param string debugging message
|
|
||||||
*/
|
|
||||||
void IConsoleDebug(const char *dbg, const char *string)
|
|
||||||
{
|
|
||||||
if (_settings_client.gui.developer <= 1) return;
|
|
||||||
IConsolePrintF(CC_DEBUG, "dbg: [%s] %s", dbg, string);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It is possible to print warnings to the console. These are mostly
|
* It is possible to print warnings to the console. These are mostly
|
||||||
* errors or mishaps, but non-fatal. You need at least a level 1 (developer) for
|
* errors or mishaps, but non-fatal. You need at least a level 1 (developer) for
|
||||||
|
|
|
@ -47,7 +47,6 @@ static inline void IConsolePrint(TextColour colour_code, const T &format, A firs
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDECL IConsolePrintF(TextColour colour_code, const char *format, ...) WARN_FORMAT(2, 3);
|
void CDECL IConsolePrintF(TextColour colour_code, const char *format, ...) WARN_FORMAT(2, 3);
|
||||||
void IConsoleDebug(const char *dbg, const char *string);
|
|
||||||
void IConsoleWarning(const char *string);
|
void IConsoleWarning(const char *string);
|
||||||
void IConsoleError(const char *string);
|
void IConsoleError(const char *string);
|
||||||
|
|
||||||
|
|
|
@ -135,8 +135,9 @@ void DebugPrint(const char *level, const std::string &message)
|
||||||
#else
|
#else
|
||||||
fputs(msg.c_str(), stderr);
|
fputs(msg.c_str(), stderr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NetworkAdminConsole(level, message);
|
NetworkAdminConsole(level, message);
|
||||||
IConsoleDebug(level, message.c_str());
|
if (_settings_client.gui.developer >= 2) IConsolePrint(CC_DEBUG, "dbg: [{}] {}", level, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue