Codechange: make TownProductionEffect a scoped enum

This commit is contained in:
Peter Nelson
2026-04-12 14:46:54 +01:00
committed by Peter Nelson
parent 7c6da0ae6d
commit 636fcf3af3
9 changed files with 35 additions and 36 deletions
+1 -2
View File
@@ -22,7 +22,6 @@
#include "safeguards.h"
CargoSpec CargoSpec::array[NUM_CARGO];
std::array<std::vector<const CargoSpec *>, NUM_TPE> CargoSpec::town_production_cargoes{};
/**
* Bitmask of cargo types available. This includes phony cargoes like regearing cargoes.
@@ -241,7 +240,7 @@ void InitializeSortedCargoSpecs()
_standard_cargo_mask = 0;
uint8_t nb_standard_cargo = 0;
for (const auto &cargo : _sorted_cargo_specs) {
assert(cargo->town_production_effect != INVALID_TPE);
assert(cargo->town_production_effect != TownProductionEffect::Invalid);
CargoSpec::town_production_cargoes[cargo->town_production_effect].push_back(cargo);
if (cargo->classes.Test(CargoClass::Special)) break;
nb_standard_cargo++;