diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/station.cpp | 36 | ||||
-rw-r--r-- | src/station_base.h | 3 |
2 files changed, 11 insertions, 28 deletions
diff --git a/src/station.cpp b/src/station.cpp index 158f9bce5..04a535e6e 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -30,24 +30,17 @@ INSTANTIATE_POOL_METHODS(Station) RoadStopPool _roadstop_pool("RoadStop"); INSTANTIATE_POOL_METHODS(RoadStop) -Station::Station(TileIndex tile) +Station::Station(TileIndex tile) : + xy(tile), + train_tile(INVALID_TILE), + airport_tile(INVALID_TILE), + dock_tile(INVALID_TILE), + indtype(IT_INVALID), + time_since_load(255), + time_since_unload(255), + last_vehicle_type(VEH_INVALID) { - DEBUG(station, cDebugCtorLevel, "I+%3d", index); - - xy = tile; - airport_tile = dock_tile = train_tile = INVALID_TILE; - bus_stops = truck_stops = NULL; - had_vehicle_of_type = 0; - time_since_load = 255; - time_since_unload = 255; - delete_ctr = 0; - facilities = 0; - - last_vehicle_type = VEH_INVALID; - indtype = IT_INVALID; - - random_bits = 0; // Random() must be called when station is really built (DC_EXEC) - waiting_triggers = 0; + /* this->random_bits is set in Station::AddFacility() */ } /** @@ -58,8 +51,6 @@ Station::Station(TileIndex tile) */ Station::~Station() { - DEBUG(station, cDebugCtorLevel, "I-%3d", index); - free(this->name); free(this->speclist); @@ -453,11 +444,8 @@ StationRect& StationRect::operator = (Rect src) /** Initializes a RoadStop */ RoadStop::RoadStop(TileIndex tile) : xy(tile), - status(3), // stop is free - num_vehicles(0), - next(NULL) + status(3) // stop is free { - DEBUG(ms, cDebugCtorLevel, "I+ at %d[0x%x]", tile, tile); } /** De-Initializes a RoadStops. This includes clearing all slots that vehicles might @@ -475,8 +463,6 @@ RoadStop::~RoadStop() } } assert(num_vehicles == 0); - - DEBUG(ms, cDebugCtorLevel , "I- at %d[0x%x]", xy, xy); } /** Checks whether there is a free bay in this road stop */ diff --git a/src/station_base.h b/src/station_base.h index 1849682b6..17ba23029 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -51,7 +51,6 @@ struct GoodsEntry { /** A Stop for a Road Vehicle */ struct RoadStop : RoadStopPool::PoolItem<&_roadstop_pool> { - static const int cDebugCtorLevel = 5; ///< Debug level on which Contructor / Destructor messages are printed static const uint LIMIT = 16; ///< The maximum amount of roadstops that are allowed at a single station static const uint MAX_BAY_COUNT = 2; ///< The maximum number of loading bays static const uint MAX_VEHICLES = 64; ///< The maximum number of vehicles that can allocate a slot to this roadstop @@ -166,8 +165,6 @@ public: StationRect rect; ///< Station spread out rectangle (not saved) maintained by StationRect_xxx() functions - static const int cDebugCtorLevel = 5; - Station(TileIndex tile = INVALID_TILE); ~Station(); |