summaryrefslogtreecommitdiff
path: root/src/station.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-01 23:49:06 +0000
committerrubidium <rubidium@openttd.org>2007-08-01 23:49:06 +0000
commitaa78685c99dc1cd2fe28a05ba55eb719e12f4029 (patch)
treea6179b4654ee8bc1cf111be24063de2f08787322 /src/station.h
parent4e96ce3dfea13ffab951a93061e35423e0b321e5 (diff)
downloadopenttd-aa78685c99dc1cd2fe28a05ba55eb719e12f4029.tar.xz
(svn r10745) -Codechange: generalize the pool cleanup/initialize functions for stations (in such a manner that they can be used for other pools too).
Diffstat (limited to 'src/station.h')
-rw-r--r--src/station.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/station.h b/src/station.h
index c447f2ab7..e35ce7d3a 100644
--- a/src/station.h
+++ b/src/station.h
@@ -55,6 +55,9 @@ struct RoadStop {
RoadStop(TileIndex tile);
~RoadStop();
+ void PreInit() { this->xy = INVALID_TILE; }
+ void QuickFree() {}
+
void *operator new (size_t size);
void operator delete(void *rs);
@@ -164,12 +167,15 @@ struct Station {
Station(TileIndex tile = 0);
~Station();
+ void PreInit() {}
+ void QuickFree();
+
/* normal new/delete operators. Used when building/removing station */
- void* operator new (size_t size);
+ void *operator new (size_t size);
void operator delete(void *p);
/* new/delete operators accepting station index. Used when loading station from savegame. */
- void* operator new (size_t size, int st_idx);
+ void *operator new (size_t size, int st_idx);
void operator delete(void *p, int st_idx);
void AddFacility(byte new_facility_bit, TileIndex facil_xy);