1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Replace format_string(4) with OpenRCT2::FormatStringLegacy() (#19190)

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
Michael Steenbeek
2023-01-17 21:56:30 +01:00
committed by GitHub
parent d6f58c2f1f
commit 12874f2af7
32 changed files with 93 additions and 72 deletions

View File

@@ -16,6 +16,7 @@
#include <openrct2/core/Json.hpp>
#include <openrct2/core/String.hpp>
#include <openrct2/localisation/Formatter.h>
#include <openrct2/localisation/Formatting.h>
#include <openrct2/localisation/Localisation.h>
#include <openrct2/object/ObjectList.h>
#include <openrct2/object/ObjectManager.h>
@@ -121,7 +122,8 @@ private:
ft.Add<int16_t>(static_cast<int16_t>(_downloadStatusInfo.Count));
ft.Add<int16_t>(static_cast<int16_t>(_downloadStatusInfo.Total));
ft.Add<char*>(_downloadStatusInfo.Name.c_str());
format_string(str_downloading_objects, sizeof(str_downloading_objects), STR_DOWNLOADING_OBJECTS, ft.Data());
OpenRCT2::FormatStringLegacy(
str_downloading_objects, sizeof(str_downloading_objects), STR_DOWNLOADING_OBJECTS, ft.Data());
}
else
{
@@ -129,7 +131,7 @@ private:
ft.Add<char*>(_downloadStatusInfo.Source.c_str());
ft.Add<int16_t>(static_cast<int16_t>(_downloadStatusInfo.Count));
ft.Add<int16_t>(static_cast<int16_t>(_downloadStatusInfo.Total));
format_string(
OpenRCT2::FormatStringLegacy(
str_downloading_objects, sizeof(str_downloading_objects), STR_DOWNLOADING_OBJECTS_FROM, ft.Data());
}