1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 19:02:41 +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

@@ -2619,7 +2619,6 @@ struct IndustryCargoesWindow : public Window {
this->cargo_textsize.width = 0;
this->cargo_textsize.height = 0;
for (const CargoSpec *csp : CargoSpec::Iterate()) {
if (!csp->IsValid()) continue;
this->cargo_textsize = maxdim(this->cargo_textsize, GetStringBoundingBox(csp->name));
}
d = maxdim(d, this->cargo_textsize); // Box must also be wide enough to hold any cargo label.