1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-01 02:49:10 +00:00

Codechange: Shuffle RoadStop members to reduce size.

Size is reduced from 40 bytes to 32 bytes on 64 bit platforms.
This commit is contained in:
2024-06-13 19:09:36 +01:00
committed by Peter Nelson
parent 77f62e0c90
commit 7b7e00123e

View File

@@ -64,14 +64,14 @@ struct RoadStop : RoadStopPool::PoolItem<&_roadstop_pool> {
void Rebuild(const RoadStop *rs, int side = -1);
};
TileIndex xy; ///< Position on the map
uint8_t status; ///< Current status of the Stop, @see RoadStopSatusFlag. Access using *Bay and *Busy functions.
struct RoadStop *next; ///< Next stop of the given type at this station
uint8_t status; ///< Current status of the Stop, @see RoadStopSatusFlag. Access using *Bay and *Busy functions.
TileIndex xy; ///< Position on the map
RoadStop *next; ///< Next stop of the given type at this station
/** Initializes a RoadStop */
inline RoadStop(TileIndex tile = INVALID_TILE) :
xy(tile),
status((1 << RSSFB_BAY_COUNT) - 1)
status((1 << RSSFB_BAY_COUNT) - 1),
xy(tile)
{ }
~RoadStop();