Codechange: Simplify usage of GRFFile cargo_map. (#11349)

This commit is contained in:
Peter Nelson
2023-10-20 18:38:54 +01:00
committed by GitHub
parent 69e20e79ab
commit bc8e26f4e7
2 changed files with 7 additions and 14 deletions

View File

@@ -127,7 +127,7 @@ struct GRFFile : ZeroedMemoryAllocator {
std::vector<GRFLabel> labels; ///< List of labels
std::vector<CargoLabel> cargo_list; ///< Cargo translation table (local ID -> label)
uint8_t cargo_map[NUM_CARGO]; ///< Inverse cargo translation table (CargoID -> local ID)
std::array<uint8_t, NUM_CARGO> cargo_map{}; ///< Inverse cargo translation table (CargoID -> local ID)
std::vector<RailTypeLabel> railtype_list; ///< Railtype translation table
RailType railtype_map[RAILTYPE_END];