Use StringBuilder for GetString/GetStringWithArgs, as per upstream

Update dependent code as required
This commit is contained in:
Jonathan G Rennison
2024-01-05 21:12:54 +00:00
parent 1b7a5372ec
commit f034714559
61 changed files with 1064 additions and 1228 deletions

View File

@@ -493,7 +493,7 @@ class NIHVehicle : public NIHelper {
b = buffer + seprintf(buffer, lastof(buffer), " %s [%d, %d, %d], %u, ",
info.id == v->index ? "*" : " ", info.order_count, info.order_ticks, info.cumulative_ticks, info.id);
SetDParam(0, info.id);
b = GetString(b, STR_VEHICLE_NAME, lastof(buffer));
b = strecpy(b, GetString(STR_VEHICLE_NAME).c_str(), lastof(buffer), true);
b += seprintf(b, lastof(buffer), ", lateness: %d", Vehicle::Get(info.id)->lateness_counter);
output.print(buffer);
}