forked from rosebudai/OpenRCT2-Web
Rename format_string(2) and is_user_string_id() (#19178)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
1 parent
76b918e7ed
commit
bf5f7e8e71
27 files changed
+56
-56
No files matched your search
@@ -301,20 +301,20 @@ std::string ShortcutInput::ToString(bool localised) const
|
||||
switch (Button)
|
||||
{
|
||||
case 0:
|
||||
result += localised ? FormatStringId(STR_SHORTCUT_MOUSE_LEFT, Button + 1) : "LMB";
|
||||
result += localised ? FormatStringID(STR_SHORTCUT_MOUSE_LEFT, Button + 1) : "LMB";
|
||||
break;
|
||||
case 1:
|
||||
result += localised ? FormatStringId(STR_SHORTCUT_MOUSE_RIGHT, Button + 1) : "RMB";
|
||||
result += localised ? FormatStringID(STR_SHORTCUT_MOUSE_RIGHT, Button + 1) : "RMB";
|
||||
break;
|
||||
default:
|
||||
result += localised ? FormatStringId(STR_SHORTCUT_MOUSE_NUMBER, Button + 1)
|
||||
result += localised ? FormatStringID(STR_SHORTCUT_MOUSE_NUMBER, Button + 1)
|
||||
: "MOUSE " + std::to_string(Button + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (Kind == InputDeviceKind::JoyButton)
|
||||
{
|
||||
result += localised ? FormatStringId(STR_SHORTCUT_JOY_NUMBER, Button + 1) : "JOY " + std::to_string(Button + 1);
|
||||
result += localised ? FormatStringID(STR_SHORTCUT_JOY_NUMBER, Button + 1) : "JOY " + std::to_string(Button + 1);
|
||||
}
|
||||
else if (Kind == InputDeviceKind::JoyHat)
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@ rct_window* WindowErrorOpen(std::string_view title, std::string_view message)
|
||||
|
||||
rct_window* WindowErrorOpen(StringId title, StringId message, const Formatter& args)
|
||||
{
|
||||
auto titlez = format_string(title, args.Data());
|
||||
auto messagez = format_string(message, args.Data());
|
||||
auto titlez = FormatStringID(title, args.Data());
|
||||
auto messagez = FormatStringID(message, args.Data());
|
||||
return WindowErrorOpen(titlez, messagez);
|
||||
}
|
||||
@@ -462,7 +462,7 @@ static u8string OpenSystemFileBrowser(bool isSave)
|
||||
if (buffer.empty())
|
||||
{
|
||||
// Use localised "Unnamed Park" if park name was empty.
|
||||
buffer = format_string(STR_UNNAMED_PARK, nullptr);
|
||||
buffer = FormatStringID(STR_UNNAMED_PARK, nullptr);
|
||||
}
|
||||
path = Path::Combine(path, buffer);
|
||||
}
|
||||
|
||||
@@ -1161,7 +1161,7 @@ private:
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
{
|
||||
gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL;
|
||||
gDropdownItems[i].Args = DateFormatStringIds[i];
|
||||
gDropdownItems[i].Args = DateFormatStringIDs[i];
|
||||
}
|
||||
ShowDropdown(widget, 4);
|
||||
Dropdown::SetChecked(gConfigGeneral.DateFormat, true);
|
||||
@@ -1275,7 +1275,7 @@ private:
|
||||
}
|
||||
|
||||
// Date format
|
||||
widgets[WIDX_DATE_FORMAT].text = DateFormatStringIds[gConfigGeneral.DateFormat];
|
||||
widgets[WIDX_DATE_FORMAT].text = DateFormatStringIDs[gConfigGeneral.DateFormat];
|
||||
|
||||
// Temperature: celsius/fahrenheit
|
||||
widgets[WIDX_TEMPERATURE].text = gConfigGeneral.TemperatureFormat == TemperatureUnit::Fahrenheit ? STR_FAHRENHEIT
|
||||
|
||||
@@ -5079,7 +5079,7 @@ static std::string GetMusicString(ObjectEntryIndex musicObjectIndex)
|
||||
auto musicObj = static_cast<MusicObject*>(objManager.GetLoadedObject(ObjectType::Music, musicObjectIndex));
|
||||
|
||||
auto name = musicObj->NameStringId;
|
||||
return format_string(name, {});
|
||||
return FormatStringID(name, {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -405,7 +405,7 @@ void WindowTextInputOpen(
|
||||
rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
StringId existing_text, uintptr_t existing_args, int32_t maxLength)
|
||||
{
|
||||
auto existingText = format_string(existing_text, &existing_args);
|
||||
auto existingText = FormatStringID(existing_text, &existing_args);
|
||||
WindowTextInputRawOpen(call_w, call_widget, title, description, descriptionArgs, existingText.c_str(), maxLength);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace GameActions
|
||||
}
|
||||
std::string operator()(const StringId strId) const
|
||||
{
|
||||
return format_string(strId, ErrorMessageArgs);
|
||||
return FormatStringID(strId, ErrorMessageArgs);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -827,7 +827,7 @@ bool ConfigFindOrBrowseInstallDirectory()
|
||||
auto uiContext = GetContext()->GetUiContext();
|
||||
if (!uiContext->HasFilePicker())
|
||||
{
|
||||
uiContext->ShowMessageBox(format_string(STR_NEEDS_RCT2_FILES_MANUAL, nullptr));
|
||||
uiContext->ShowMessageBox(FormatStringID(STR_NEEDS_RCT2_FILES_MANUAL, nullptr));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -836,7 +836,7 @@ bool ConfigFindOrBrowseInstallDirectory()
|
||||
const char* g1DatPath = PATH_SEPARATOR "Data" PATH_SEPARATOR "g1.dat";
|
||||
while (true)
|
||||
{
|
||||
uiContext->ShowMessageBox(format_string(STR_NEEDS_RCT2_FILES, nullptr));
|
||||
uiContext->ShowMessageBox(FormatStringID(STR_NEEDS_RCT2_FILES, nullptr));
|
||||
std::string gog = LanguageGetString(STR_OWN_ON_GOG);
|
||||
std::string hdd = LanguageGetString(STR_INSTALLED_ON_HDD);
|
||||
|
||||
@@ -875,7 +875,7 @@ bool ConfigFindOrBrowseInstallDirectory()
|
||||
std::string dummy;
|
||||
if (!Platform::FindApp("innoextract", &dummy))
|
||||
{
|
||||
uiContext->ShowMessageBox(format_string(STR_INSTALL_INNOEXTRACT, nullptr));
|
||||
uiContext->ShowMessageBox(FormatStringID(STR_INSTALL_INNOEXTRACT, nullptr));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -913,7 +913,7 @@ bool ConfigFindOrBrowseInstallDirectory()
|
||||
return true;
|
||||
}
|
||||
|
||||
uiContext->ShowMessageBox(format_string(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath));
|
||||
uiContext->ShowMessageBox(FormatStringID(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath));
|
||||
}
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
|
||||
@@ -180,7 +180,7 @@ int32_t DrawTextWrapped(
|
||||
const void* args = ft.Data();
|
||||
|
||||
// TODO: Refactor StaticLayout to take a std::string_view instead. It shouldn't have to write to the buffer.
|
||||
const std::string buffer = format_string(format, args);
|
||||
const std::string buffer = FormatStringID(format, args);
|
||||
StaticLayout layout(const_cast<char*>(buffer.c_str()), textPaint, width);
|
||||
|
||||
if (textPaint.Alignment == TextAlignment::CENTRE)
|
||||
|
||||
@@ -1596,7 +1596,7 @@ std::string Peep::GetName() const
|
||||
{
|
||||
Formatter ft;
|
||||
FormatNameTo(ft);
|
||||
return format_string(STR_STRINGID, ft.Data());
|
||||
return FormatStringID(STR_STRINGID, ft.Data());
|
||||
}
|
||||
|
||||
bool Peep::SetName(std::string_view value)
|
||||
|
||||
@@ -461,7 +461,7 @@ static void BenchgfxRenderScreenshots(const char* inputPath, std::unique_ptr<ICo
|
||||
|
||||
const double average = totalTime / static_cast<double>(totalRenderCount);
|
||||
const auto engineStringId = DrawingEngineStringIds[EnumValue(DrawingEngine::Software)];
|
||||
const auto engineName = format_string(engineStringId, nullptr);
|
||||
const auto engineName = FormatStringID(engineStringId, nullptr);
|
||||
std::printf("Engine: %s\n", engineName.c_str());
|
||||
std::printf("Render Count: %u\n", totalRenderCount);
|
||||
for (ZoomLevel zoom{ 0 }; zoom < ZoomLevel::max(); zoom++)
|
||||
|
||||
@@ -44,7 +44,7 @@ struct openrct2_timeofday
|
||||
};
|
||||
|
||||
extern const int16_t days_in_month[MONTH_COUNT];
|
||||
extern const StringId DateFormatStringIds[];
|
||||
extern const StringId DateFormatStringIDs[];
|
||||
extern const StringId DateFormatStringFormatIds[];
|
||||
|
||||
extern uint16_t gDateMonthTicks;
|
||||
|
||||
@@ -449,12 +449,12 @@ namespace OpenRCT2
|
||||
if (minutes == 0)
|
||||
{
|
||||
auto fmt = Formats[0][seconds == 1 ? 0 : 1];
|
||||
FormatStringId(ss, fmt, seconds);
|
||||
FormatStringID(ss, fmt, seconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto fmt = Formats[minutes == 1 ? 1 : 2][seconds == 1 ? 0 : 1];
|
||||
FormatStringId(ss, fmt, minutes, seconds);
|
||||
FormatStringID(ss, fmt, minutes, seconds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,12 +471,12 @@ namespace OpenRCT2
|
||||
if (hours == 0)
|
||||
{
|
||||
auto fmt = Formats[0][minutes == 1 ? 0 : 1];
|
||||
FormatStringId(ss, fmt, minutes);
|
||||
FormatStringID(ss, fmt, minutes);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto fmt = Formats[hours == 1 ? 1 : 2][minutes == 1 ? 0 : 1];
|
||||
FormatStringId(ss, fmt, hours, minutes);
|
||||
FormatStringID(ss, fmt, hours, minutes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,13 +537,13 @@ namespace OpenRCT2
|
||||
{
|
||||
default:
|
||||
case MeasurementFormat::Imperial:
|
||||
FormatStringId(ss, STR_UNIT_SUFFIX_MILES_PER_HOUR, arg);
|
||||
FormatStringID(ss, STR_UNIT_SUFFIX_MILES_PER_HOUR, arg);
|
||||
break;
|
||||
case MeasurementFormat::Metric:
|
||||
FormatStringId(ss, STR_UNIT_SUFFIX_KILOMETRES_PER_HOUR, mph_to_kmph(arg));
|
||||
FormatStringID(ss, STR_UNIT_SUFFIX_KILOMETRES_PER_HOUR, mph_to_kmph(arg));
|
||||
break;
|
||||
case MeasurementFormat::SI:
|
||||
FormatStringId(ss, STR_UNIT_SUFFIX_METRES_PER_SECOND, mph_to_dmps(arg));
|
||||
FormatStringID(ss, STR_UNIT_SUFFIX_METRES_PER_SECOND, mph_to_dmps(arg));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -567,11 +567,11 @@ namespace OpenRCT2
|
||||
{
|
||||
default:
|
||||
case MeasurementFormat::Imperial:
|
||||
FormatStringId(ss, STR_UNIT_SUFFIX_FEET, metres_to_feet(arg));
|
||||
FormatStringID(ss, STR_UNIT_SUFFIX_FEET, metres_to_feet(arg));
|
||||
break;
|
||||
case MeasurementFormat::Metric:
|
||||
case MeasurementFormat::SI:
|
||||
FormatStringId(ss, STR_UNIT_SUFFIX_METRES, arg);
|
||||
FormatStringID(ss, STR_UNIT_SUFFIX_METRES, arg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,22 +284,22 @@ namespace OpenRCT2
|
||||
return CopyStringStreamToBuffer(buffer, bufferLen, ss);
|
||||
}
|
||||
|
||||
template<typename... TArgs> static void FormatStringId(FormatBuffer& ss, StringId id, TArgs&&... argN)
|
||||
template<typename... TArgs> static void FormatStringID(FormatBuffer& ss, StringId id, TArgs&&... argN)
|
||||
{
|
||||
auto fmt = GetFmtStringById(id);
|
||||
FormatString(ss, fmt, argN...);
|
||||
}
|
||||
|
||||
template<typename... TArgs> std::string FormatStringId(StringId id, TArgs&&... argN)
|
||||
template<typename... TArgs> std::string FormatStringID(StringId id, TArgs&&... argN)
|
||||
{
|
||||
auto fmt = GetFmtStringById(id);
|
||||
return FormatString(fmt, argN...);
|
||||
}
|
||||
|
||||
template<typename... TArgs> size_t FormatStringId(char* buffer, size_t bufferLen, StringId id, TArgs&&... argN)
|
||||
template<typename... TArgs> size_t FormatStringID(char* buffer, size_t bufferLen, StringId id, TArgs&&... argN)
|
||||
{
|
||||
auto& ss = GetThreadFormatStream();
|
||||
FormatStringId(ss, id, argN...);
|
||||
FormatStringID(ss, id, argN...);
|
||||
return CopyStringStreamToBuffer(buffer, bufferLen, ss);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ const int16_t days_in_month[MONTH_COUNT] = {
|
||||
31, 30, 31, 30, 31, 31, 30, 31,
|
||||
};
|
||||
|
||||
const StringId DateFormatStringIds[] = {
|
||||
const StringId DateFormatStringIDs[] = {
|
||||
STR_DATE_FORMAT_DAY_MONTH_YEAR,
|
||||
STR_DATE_FORMAT_MONTH_DAY_YEAR,
|
||||
STR_DATE_FORMAT_YEAR_MONTH_DAY,
|
||||
|
||||
@@ -328,7 +328,7 @@ const StringId DateGameShortMonthNames[MONTH_COUNT] = {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
std::string format_string(StringId format, const void* args)
|
||||
std::string FormatStringID(StringId format, const void* args)
|
||||
{
|
||||
std::string buffer(256, 0);
|
||||
size_t len{};
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
std::string format_string(StringId format, const void* args);
|
||||
std::string FormatStringID(StringId format, const void* args);
|
||||
void format_string(char* dest, size_t size, StringId format, const void* args);
|
||||
void FormatStringToUpper(char* dest, size_t size, StringId format, const void* args);
|
||||
void generate_string_file();
|
||||
@@ -41,7 +41,7 @@ size_t GetStringSize(const utf8* text);
|
||||
money64 StringToMoney(const char* string_to_monetise);
|
||||
void MoneyToString(money64 amount, char* buffer_to_put_value_to, size_t buffer_len, bool forceDecimals);
|
||||
|
||||
bool is_user_string_id(StringId stringId);
|
||||
bool IsUserStringID(StringId stringId);
|
||||
|
||||
#define MAX_USER_STRINGS 1024
|
||||
#define USER_STRING_MAX_LENGTH 32
|
||||
|
||||
@@ -3089,7 +3089,7 @@ void NetworkBase::Client_Handle_EVENT([[maybe_unused]] NetworkConnection& connec
|
||||
case SERVER_EVENT_PLAYER_JOINED:
|
||||
{
|
||||
auto playerName = packet.ReadString();
|
||||
auto message = FormatStringId(STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, playerName);
|
||||
auto message = FormatStringID(STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, playerName);
|
||||
ChatAddHistory(message);
|
||||
break;
|
||||
}
|
||||
@@ -3100,11 +3100,11 @@ void NetworkBase::Client_Handle_EVENT([[maybe_unused]] NetworkConnection& connec
|
||||
std::string message;
|
||||
if (reason.empty())
|
||||
{
|
||||
message = FormatStringId(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_NO_REASON, playerName);
|
||||
message = FormatStringID(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_NO_REASON, playerName);
|
||||
}
|
||||
else
|
||||
{
|
||||
message = FormatStringId(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_WITH_REASON, playerName, reason);
|
||||
message = FormatStringID(STR_MULTIPLAYER_PLAYER_HAS_DISCONNECTED_WITH_REASON, playerName, reason);
|
||||
}
|
||||
ChatAddHistory(message);
|
||||
break;
|
||||
|
||||
@@ -816,7 +816,7 @@ namespace RCT1
|
||||
}
|
||||
|
||||
// Ride name
|
||||
if (is_user_string_id(src->name))
|
||||
if (IsUserStringID(src->name))
|
||||
{
|
||||
dst->custom_name = GetUserString(src->name);
|
||||
}
|
||||
@@ -1286,7 +1286,7 @@ namespace RCT1
|
||||
dst->sprite_direction = src->sprite_direction;
|
||||
|
||||
// Peep name
|
||||
if (is_user_string_id(src->name_string_idx))
|
||||
if (IsUserStringID(src->name_string_idx))
|
||||
{
|
||||
dst->SetName(GetUserString(src->name_string_idx));
|
||||
}
|
||||
@@ -2106,7 +2106,7 @@ namespace RCT1
|
||||
void ImportParkName()
|
||||
{
|
||||
std::string parkName = std::string(_s4.scenario_name);
|
||||
if (is_user_string_id(static_cast<StringId>(_s4.park_name_string_index)))
|
||||
if (IsUserStringID(static_cast<StringId>(_s4.park_name_string_index)))
|
||||
{
|
||||
std::string userString = GetUserString(_s4.park_name_string_index);
|
||||
if (!userString.empty())
|
||||
@@ -2398,7 +2398,7 @@ namespace RCT1
|
||||
dst->flags |= BANNER_FLAG_NO_ENTRY;
|
||||
}
|
||||
|
||||
if (is_user_string_id(src->string_idx))
|
||||
if (IsUserStringID(src->string_idx))
|
||||
{
|
||||
dst->text = GetUserString(src->string_idx);
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ uint8_t RCT12BannerElement::GetAllowedEdges() const
|
||||
return AllowedEdges & 0b00001111;
|
||||
}
|
||||
|
||||
bool is_user_string_id(StringId stringId)
|
||||
bool IsUserStringID(StringId stringId)
|
||||
{
|
||||
return stringId >= 0x8000 && stringId < 0x9000;
|
||||
}
|
||||
|
||||
@@ -794,7 +794,7 @@ namespace RCT2
|
||||
dst->status = static_cast<RideStatus>(src->status);
|
||||
|
||||
dst->default_name_number = src->name_arguments_number;
|
||||
if (is_user_string_id(src->name))
|
||||
if (IsUserStringID(src->name))
|
||||
{
|
||||
dst->custom_name = GetUserString(src->name);
|
||||
}
|
||||
@@ -1160,7 +1160,7 @@ namespace RCT2
|
||||
dst->type = RCTEntryIndexToOpenRCT2EntryIndex(src->type);
|
||||
dst->flags = src->flags;
|
||||
|
||||
if (!(src->flags & BANNER_FLAG_LINKED_TO_RIDE) && is_user_string_id(src->string_idx))
|
||||
if (!(src->flags & BANNER_FLAG_LINKED_TO_RIDE) && IsUserStringID(src->string_idx))
|
||||
{
|
||||
dst->text = GetUserString(src->string_idx);
|
||||
}
|
||||
@@ -1686,7 +1686,7 @@ namespace RCT2
|
||||
};
|
||||
|
||||
ImportEntityCommonProperties(static_cast<EntityBase*>(dst), src);
|
||||
if (is_user_string_id(src->name_string_idx))
|
||||
if (IsUserStringID(src->name_string_idx))
|
||||
{
|
||||
dst->SetName(GetUserString(src->name_string_idx));
|
||||
}
|
||||
|
||||
@@ -5549,7 +5549,7 @@ std::string Ride::GetName() const
|
||||
{
|
||||
Formatter ft;
|
||||
FormatNameTo(ft);
|
||||
return format_string(STR_STRINGID, ft.Data());
|
||||
return FormatStringID(STR_STRINGID, ft.Data());
|
||||
}
|
||||
|
||||
void Ride::FormatNameTo(Formatter& ft) const
|
||||
|
||||
@@ -533,7 +533,7 @@ namespace OpenRCT2::Scripting
|
||||
// format string with arguments
|
||||
auto ft = Formatter();
|
||||
peep_thought_set_format_args(&_backing, ft);
|
||||
return format_string(STR_STRINGID, ft.Data());
|
||||
return FormatStringID(STR_STRINGID, ft.Data());
|
||||
}
|
||||
|
||||
} // namespace OpenRCT2::Scripting
|
||||
|
||||
@@ -258,9 +258,9 @@ void TitleScreen::TitleInitialise()
|
||||
|
||||
int32_t random = 0;
|
||||
bool safeSequence = false;
|
||||
std::string RCT1String = format_string(STR_TITLE_SEQUENCE_RCT1, nullptr);
|
||||
std::string RCT1AAString = format_string(STR_TITLE_SEQUENCE_RCT1_AA, nullptr);
|
||||
std::string RCT1LLString = format_string(STR_TITLE_SEQUENCE_RCT1_AA_LL, nullptr);
|
||||
std::string RCT1String = FormatStringID(STR_TITLE_SEQUENCE_RCT1, nullptr);
|
||||
std::string RCT1AAString = FormatStringID(STR_TITLE_SEQUENCE_RCT1_AA, nullptr);
|
||||
std::string RCT1LLString = FormatStringID(STR_TITLE_SEQUENCE_RCT1_AA_LL, nullptr);
|
||||
|
||||
// Ensure the random sequence chosen isn't from RCT1 or expansion if the player doesn't have it installed
|
||||
while (!safeSequence)
|
||||
|
||||
@@ -39,7 +39,7 @@ std::string Banner::GetText() const
|
||||
{
|
||||
Formatter ft;
|
||||
FormatTextTo(ft);
|
||||
return format_string(STR_STRINGID, ft.Data());
|
||||
return FormatStringID(STR_STRINGID, ft.Data());
|
||||
}
|
||||
|
||||
void Banner::FormatTextTo(Formatter& ft, bool addColour) const
|
||||
|
||||
@@ -252,7 +252,7 @@ money64 Park::GetCompanyValue() const
|
||||
|
||||
void Park::Initialise()
|
||||
{
|
||||
Name = format_string(STR_UNNAMED_PARK, nullptr);
|
||||
Name = FormatStringID(STR_UNNAMED_PARK, nullptr);
|
||||
PluginStorage = {};
|
||||
gStaffHandymanColour = COLOUR_BRIGHT_RED;
|
||||
gStaffMechanicColour = COLOUR_LIGHT_BLUE;
|
||||
|
||||
@@ -317,7 +317,7 @@ TEST_F(FormattingTests, to_fixed_buffer)
|
||||
{
|
||||
char buffer[16];
|
||||
std::memset(buffer, '\xFF', sizeof(buffer));
|
||||
auto len = FormatStringId(buffer, 8, STR_GUEST_X, 123);
|
||||
auto len = FormatStringID(buffer, 8, STR_GUEST_X, 123);
|
||||
ASSERT_EQ(len, 9u);
|
||||
ASSERT_STREQ("Guest 1", buffer);
|
||||
|
||||
|
||||
Reference in new issue
Block a user