diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/station.cpp | 10 | ||||
-rw-r--r-- | src/station.h | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/station.cpp b/src/station.cpp index dead0a1fa..3d932f087 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -52,16 +52,6 @@ Station::Station(TileIndex tile) last_vehicle_type = VEH_Invalid; - for (GoodsEntry *ge = goods; ge != endof(goods); ge++) { - ge->waiting_acceptance = 0; - ge->days_since_pickup = 0; - ge->enroute_from = INVALID_STATION; - ge->rating = 175; - ge->last_speed = 0; - ge->last_age = 0xFF; - ge->feeder_profit = 0; - } - random_bits = Random(); waiting_triggers = 0; diff --git a/src/station.h b/src/station.h index 6c624f88b..73486bffe 100644 --- a/src/station.h +++ b/src/station.h @@ -10,7 +10,19 @@ #include "tile.h" #include "newgrf_station.h" +static const StationID INVALID_STATION = 0xFFFF; + typedef struct GoodsEntry { + GoodsEntry() : + waiting_acceptance(0), + days_since_pickup(0), + rating(175), + enroute_from(INVALID_STATION), + last_speed(0), + last_age(255), + feeder_profit(0) + {} + uint16 waiting_acceptance; byte days_since_pickup; byte rating; @@ -30,8 +42,6 @@ enum { ROAD_STOP_LIMIT = 16, }; -static const StationID INVALID_STATION = 0xFFFF; - typedef struct RoadStop { TileIndex xy; bool used; |