Codechange: use EnumBitSet for CargoTypes

This commit is contained in:
Peter Nelson
2026-04-21 17:13:31 +01:00
committed by Peter Nelson
parent 962a550d1b
commit c45aa3c9b6
55 changed files with 278 additions and 265 deletions
+2 -2
View File
@@ -636,7 +636,7 @@ static void AddAcceptedCargo_Object(TileIndex tile, CargoArray &acceptance, Carg
CargoType pass = GetCargoTypeByLabel(CT_PASSENGERS);
if (IsValidCargoType(pass)) {
acceptance[pass] += std::max(1U, level);
SetBit(always_accepted, pass);
always_accepted.Set(pass);
}
/* Top town building generates 4, HQ can make up to 8. The
@@ -646,7 +646,7 @@ static void AddAcceptedCargo_Object(TileIndex tile, CargoArray &acceptance, Carg
CargoType mail = GetCargoTypeByLabel(CT_MAIL);
if (IsValidCargoType(mail)) {
acceptance[mail] += std::max(1U, level / 2);
SetBit(always_accepted, mail);
always_accepted.Set(mail);
}
}