1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-28 06:34:33 +01:00

Codechange: CargoSpec::Iterate already tests cargo validity. (#13941)

This commit is contained in:
Peter Nelson
2025-04-01 18:23:26 +01:00
committed by GitHub
parent 8d0ba5649a
commit 2ae84f3c9e
3 changed files with 0 additions and 4 deletions

View File

@@ -528,8 +528,6 @@ static void BuildCargoTranslationMap()
auto cargo_list = GetCargoTranslationTable(*_cur.grffile);
for (const CargoSpec *cs : CargoSpec::Iterate()) {
if (!cs->IsValid()) continue;
/* Check the translation table for this cargo's label */
int idx = find_index(cargo_list, cs->label);
if (idx >= 0) _cur.grffile->cargo_map[cs->Index()] = idx;