Codechange: Pass preformatted string when updating sign positions. (#13480)

This forces the strings to be formatted in advance and avoids using global string parameters.
This commit is contained in:
Peter Nelson
2025-02-07 13:19:00 +00:00
committed by GitHub
parent eaa765d615
commit 8c48f9fc49
7 changed files with 16 additions and 24 deletions

View File

@@ -448,9 +448,7 @@ void Station::UpdateVirtCoord()
if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeStation(this->index));
SetDParam(0, this->index);
SetDParam(1, this->facilities);
this->sign.UpdatePosition(pt.x, pt.y, STR_VIEWPORT_STATION, STR_STATION_NAME);
this->sign.UpdatePosition(pt.x, pt.y, GetString(STR_VIEWPORT_STATION, this->index, this->facilities), GetString(STR_STATION_NAME, this->index, this->facilities));
_viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeStation(this->index));