Codechange: Use EnumBitSet for CargoClasses. (#13491)

This commit is contained in:
Peter Nelson
2025-02-08 08:46:38 +00:00
committed by GitHub
parent 04d53ed6f5
commit d61b376998
18 changed files with 157 additions and 160 deletions

View File

@@ -60,7 +60,7 @@
/* static */ bool ScriptCargo::HasCargoClass(CargoType cargo_type, CargoClass cargo_class)
{
if (!IsValidCargo(cargo_type)) return false;
return ::IsCargoInClass(cargo_type, (::CargoClass)cargo_class);
return ::IsCargoInClass(cargo_type, ::CargoClasses(to_underlying(cargo_class)));
}
/* static */ ScriptCargo::TownEffect ScriptCargo::GetTownEffect(CargoType cargo_type)