summaryrefslogtreecommitdiff
path: root/src/depot_base.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-22 15:13:50 +0000
committersmatz <smatz@openttd.org>2009-05-22 15:13:50 +0000
commit62a7948af0ca9eb3b190a54918201e1075edcbbc (patch)
tree27a79b7850682cd43cac2462c3410ed8b567c4b2 /src/depot_base.h
parent04723b240ebc7384954f73590be517ad2a47ce04 (diff)
downloadopenttd-62a7948af0ca9eb3b190a54918201e1075edcbbc.tar.xz
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
Diffstat (limited to 'src/depot_base.h')
-rw-r--r--src/depot_base.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/depot_base.h b/src/depot_base.h
index 350eaee8f..b4e47cb60 100644
--- a/src/depot_base.h
+++ b/src/depot_base.h
@@ -7,19 +7,18 @@
#include "tile_type.h"
#include "depot_type.h"
-#include "oldpool.h"
+#include "core/pool.hpp"
#include "town_type.h"
-DECLARE_OLD_POOL(Depot, Depot, 3, 8000)
+typedef Pool<Depot, DepotID, 64, 64000> DepotPool;
+extern DepotPool _depot_pool;
-struct Depot : PoolItem<Depot, DepotID, &_Depot_pool> {
+struct Depot : DepotPool::PoolItem<&_depot_pool> {
TileIndex xy;
TownID town_index;
Depot(TileIndex xy = INVALID_TILE) : xy(xy) {}
~Depot();
-
- inline bool IsValid() const { return this->xy != INVALID_TILE; }
};
Depot *GetDepotByTile(TileIndex tile);