Codechange: replace printf with fmt::print
This commit is contained in:
@@ -169,24 +169,24 @@ public:
|
||||
char buffer[65536];
|
||||
bool ret = true;
|
||||
|
||||
printf("Crash encountered, generating crash log...\n");
|
||||
fmt::print("Crash encountered, generating crash log...\n");
|
||||
this->FillCrashLog(buffer, lastof(buffer));
|
||||
printf("%s\n", buffer);
|
||||
printf("Crash log generated.\n\n");
|
||||
fmt::print("{}\n", buffer);
|
||||
fmt::print("Crash log generated.\n\n");
|
||||
|
||||
printf("Writing crash log to disk...\n");
|
||||
fmt::print("Writing crash log to disk...\n");
|
||||
if (!this->WriteCrashLog(buffer, filename_log, lastof(filename_log))) {
|
||||
filename_log[0] = '\0';
|
||||
ret = false;
|
||||
}
|
||||
|
||||
printf("Writing crash savegame...\n");
|
||||
fmt::print("Writing crash savegame...\n");
|
||||
if (!this->WriteSavegame(filename_save, lastof(filename_save))) {
|
||||
filename_save[0] = '\0';
|
||||
ret = false;
|
||||
}
|
||||
|
||||
printf("Writing crash screenshot...\n");
|
||||
fmt::print("Writing crash screenshot...\n");
|
||||
if (!this->WriteScreenshot(filename_screenshot, lastof(filename_screenshot))) {
|
||||
filename_screenshot[0] = '\0';
|
||||
ret = false;
|
||||
|
@@ -156,15 +156,15 @@ static void CDECL HandleCrash(int signum)
|
||||
}
|
||||
|
||||
if (_gamelog.TestEmergency()) {
|
||||
printf("A serious fault condition occurred in the game. The game will shut down.\n");
|
||||
printf("As you loaded an emergency savegame no crash information will be generated.\n");
|
||||
fmt::print("A serious fault condition occurred in the game. The game will shut down.\n");
|
||||
fmt::print("As you loaded an emergency savegame no crash information will be generated.\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
if (SaveloadCrashWithMissingNewGRFs()) {
|
||||
printf("A serious fault condition occurred in the game. The game will shut down.\n");
|
||||
printf("As you loaded an savegame for which you do not have the required NewGRFs\n");
|
||||
printf("no crash information will be generated.\n");
|
||||
fmt::print("A serious fault condition occurred in the game. The game will shut down.\n");
|
||||
fmt::print("As you loaded an savegame for which you do not have the required NewGRFs\n");
|
||||
fmt::print("no crash information will be generated.\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user