summaryrefslogtreecommitdiff
path: root/src/station.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station.cpp')
-rw-r--r--src/station.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/station.cpp b/src/station.cpp
index aff65dda6..03d7a9db8 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -20,9 +20,15 @@
#include "aircraft.h"
#include "vehicle_gui.h"
#include "settings_type.h"
+#include "core/pool_func.hpp"
#include "table/strings.h"
+StationPool _station_pool("Station");
+INSTANTIATE_POOL_METHODS(Station)
+RoadStopPool _roadstop_pool("RoadStop");
+INSTANTIATE_POOL_METHODS(RoadStop)
+
Station::Station(TileIndex tile)
{
DEBUG(station, cDebugCtorLevel, "I+%3d", index);
@@ -88,8 +94,6 @@ Station::~Station()
/* Remove all news items */
DeleteStationNews(this->index);
- xy = INVALID_TILE;
-
InvalidateWindowData(WC_SELECT_STATION, 0, 0);
for (CargoID c = 0; c < NUM_CARGO; c++) {
@@ -460,8 +464,6 @@ RoadStop::~RoadStop()
assert(num_vehicles == 0);
DEBUG(ms, cDebugCtorLevel , "I- at %d[0x%x]", xy, xy);
-
- xy = INVALID_TILE;
}
/** Checks whether there is a free bay in this road stop */
@@ -546,3 +548,9 @@ RoadStop *RoadStop::GetNextRoadStop(const Vehicle *v) const
return NULL;
}
+
+void InitializeStations()
+{
+ _station_pool.CleanPool();
+ _roadstop_pool.CleanPool();
+}