Codechange: Use EnumBitSet for EngineMiscFlags.

This commit is contained in:
Peter Nelson
2025-01-30 21:03:43 +00:00
committed by Peter Nelson
parent 5664b1e2f6
commit 6c4ddb242a
13 changed files with 53 additions and 49 deletions
+1 -1
View File
@@ -386,7 +386,7 @@ static std::tuple<CommandCost, uint, uint16_t, CargoArray> RefitVehicle(Vehicle
/* If the vehicle is not refittable, or does not allow automatic refitting,
* count its capacity nevertheless if the cargo matches */
bool refittable = HasBit(e->info.refit_mask, new_cargo_type) && (!auto_refit || HasBit(e->info.misc_flags, EF_AUTO_REFIT));
bool refittable = HasBit(e->info.refit_mask, new_cargo_type) && (!auto_refit || e->info.misc_flags.Test(EngineMiscFlag::AutoRefit));
if (!refittable && v->cargo_type != new_cargo_type) {
uint amount = e->DetermineCapacity(v, nullptr);
if (amount > 0) cargo_capacities[v->cargo_type] += amount;