From dffc4d411e64269f5dd6678a8a5d599dd50bc82c Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Sun, 20 Oct 2013 13:47:11 +0000 Subject: (svn r25890) -Codechange: define a smallstack for station IDs --- src/station.cpp | 4 ++++ src/station_type.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/station.cpp b/src/station.cpp index 00c6a6d2a..0c7af914b 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -33,6 +33,10 @@ StationPool _station_pool("Station"); INSTANTIATE_POOL_METHODS(Station) +typedef StationIDStack::SmallStackPool StationIDStackPool; +template<> StationIDStackPool StationIDStack::_pool("StationIDStack"); +INSTANTIATE_POOL_METHODS(StationIDStack) + BaseStation::~BaseStation() { free(this->name); diff --git a/src/station_type.h b/src/station_type.h index 82ee0ae25..952a683d7 100644 --- a/src/station_type.h +++ b/src/station_type.h @@ -13,6 +13,7 @@ #define STATION_TYPE_H #include "core/smallvec_type.hpp" +#include "core/smallstack_type.hpp" #include "tilearea_type.h" #include @@ -28,6 +29,8 @@ struct Waypoint; static const StationID NEW_STATION = 0xFFFE; static const StationID INVALID_STATION = 0xFFFF; +typedef SmallStack StationIDStack; + /** Station types */ enum StationType { STATION_RAIL, -- cgit v1.2.3-70-g09d2