mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 18:09:09 +00:00
Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*>
This commit is contained in:
@@ -127,14 +127,14 @@ void DebugPrint(const char *level, const std::string &message)
|
||||
static FILE *f = FioFOpenFile("commands-out.log", "wb", AUTOSAVE_DIR);
|
||||
if (f == nullptr) return;
|
||||
|
||||
fprintf(f, "%s%s\n", GetLogPrefix(), message.c_str());
|
||||
fmt::print(f, "{}{}\n", GetLogPrefix(), message);
|
||||
fflush(f);
|
||||
#ifdef RANDOM_DEBUG
|
||||
} else if (strcmp(level, "random") == 0) {
|
||||
static FILE *f = FioFOpenFile("random-out.log", "wb", AUTOSAVE_DIR);
|
||||
if (f == nullptr) return;
|
||||
|
||||
fprintf(f, "%s\n", message.c_str());
|
||||
fmt::print(f, "{}\n", message);
|
||||
fflush(f);
|
||||
#endif
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user