1
0
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:
Rubidium
2023-05-21 08:13:28 +02:00
committed by rubidium42
parent c518293135
commit 275ebf4509
11 changed files with 39 additions and 41 deletions

View File

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