mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-25 13:14:19 +01:00
Add: AppendStringInPlace() to append translated string ID into an existing string. (#12969)
This allows avoiding a string copy when building strings.
This commit is contained in:
@@ -896,7 +896,7 @@ struct DepotWindow : Window {
|
||||
SetDParam(1, loaded[cargo_type]); // {CARGO} #2
|
||||
SetDParam(2, cargo_type); // {SHORTCARGO} #1
|
||||
SetDParam(3, capacity[cargo_type]); // {SHORTCARGO} #2
|
||||
details += GetString(STR_DEPOT_VEHICLE_TOOLTIP_CARGO);
|
||||
AppendStringInPlace(details, STR_DEPOT_VEHICLE_TOOLTIP_CARGO);
|
||||
}
|
||||
|
||||
/* Show tooltip window */
|
||||
|
||||
Reference in New Issue
Block a user