Slightly reorder struct Station to reduce padding waste

pull/691/merge
Jonathan G Rennison 1 week ago
parent d4819ad184
commit 04254af89c

@ -77,9 +77,7 @@ Station::Station(TileIndex tile) :
indtype(IT_INVALID),
extra_name_index(UINT16_MAX),
time_since_load(255),
time_since_unload(255),
station_cargo_history_cargoes(0),
station_cargo_history_offset(0)
time_since_unload(255)
{
/* this->random_bits is set in Station::AddFacility() */
}

@ -901,6 +901,8 @@ public:
uint8_t time_since_load;
uint8_t time_since_unload;
uint8_t station_cargo_history_offset = 0; ///< Start offset in station_cargo_history cargo ring buffer, here for alignment
std::vector<Vehicle *> loading_vehicles;
GoodsEntry goods[NUM_CARGO]; ///< Goods at this station
CargoTypes always_accepted; ///< Bitmask of always accepted cargo types (by houses, HQs, industry tiles when industry doesn't accept cargo)
@ -908,8 +910,7 @@ public:
IndustryList industries_near; ///< Cached list of industries near the station that can accept cargo, @see DeliverGoodsToIndustry()
Industry *industry; ///< NOSAVE: Associated industry for neutral stations. (Rebuilt on load from Industry->st)
CargoTypes station_cargo_history_cargoes; ///< Bitmask of cargoes in station_cargo_history
uint8_t station_cargo_history_offset; ///< Start offset in station_cargo_history cargo ring buffer
CargoTypes station_cargo_history_cargoes = 0; ///< Bitmask of cargoes in station_cargo_history
std::vector<std::array<uint16_t, MAX_STATION_CARGO_HISTORY_DAYS>> station_cargo_history; ///< Station history of waiting cargo, dynamic range compressed (see RXCompressUint)
Station(TileIndex tile = INVALID_TILE);

Loading…
Cancel
Save