From a0353af2235c9e112cce655b3e8fd74d1ef2d082 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 12 Sep 2023 00:40:49 +0100 Subject: [PATCH] Codechange: Shuffle Depot members to reduce padding. --- src/depot_base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/depot_base.h b/src/depot_base.h index 54c774523c..1d8330fc74 100644 --- a/src/depot_base.h +++ b/src/depot_base.h @@ -18,11 +18,11 @@ typedef Pool DepotPool; extern DepotPool _depot_pool; struct Depot : DepotPool::PoolItem<&_depot_pool> { + /* DepotID index member of DepotPool is 2 bytes. */ + uint16_t town_cn; ///< The N-1th depot for this town (consecutive number) + TileIndex xy; Town *town; std::string name; - - TileIndex xy; - uint16_t town_cn; ///< The N-1th depot for this town (consecutive number) TimerGameCalendar::Date build_date; ///< Date of construction Depot(TileIndex xy = INVALID_TILE) : xy(xy) {}