1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Move storage into Formatter class and refactor usage

This commit is contained in:
Matt
2020-08-26 22:54:12 +02:00
parent 1982e8491b
commit 2639349925
13 changed files with 62 additions and 80 deletions

View File

@@ -2443,11 +2443,11 @@ void NetworkBase::Client_Handle_GAMESTATE(NetworkConnection& connection, Network
{
log_info("Wrote desync report to '%s'", outputFile.c_str());
uint8_t args[32]{};
Formatter(args).Add<char*>(uniqueFileName);
Formatter ft;
ft.Add<char*>(uniqueFileName);
char str_desync[1024];
format_string(str_desync, sizeof(str_desync), STR_DESYNC_REPORT, args);
format_string(str_desync, sizeof(str_desync), STR_DESYNC_REPORT, ft.Data());
auto intent = Intent(WC_NETWORK_STATUS);
intent.putExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync });