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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user