diff options
author | smatz <smatz@openttd.org> | 2009-05-22 15:13:50 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-22 15:13:50 +0000 |
commit | 62a7948af0ca9eb3b190a54918201e1075edcbbc (patch) | |
tree | 27a79b7850682cd43cac2462c3410ed8b567c4b2 /src/signs_base.h | |
parent | 04723b240ebc7384954f73590be517ad2a47ce04 (diff) | |
download | openttd-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/signs_base.h')
-rw-r--r-- | src/signs_base.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/signs_base.h b/src/signs_base.h index e037fdc44..e4fa3f9c4 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -8,11 +8,12 @@ #include "signs_type.h" #include "viewport_type.h" #include "tile_type.h" -#include "oldpool.h" +#include "core/pool.hpp" -DECLARE_OLD_POOL(Sign, Sign, 2, 16000) +typedef Pool<Sign, SignID, 16, 64000> SignPool; +extern SignPool _sign_pool; -struct Sign : PoolItem<Sign, SignID, &_Sign_pool> { +struct Sign : SignPool::PoolItem<&_sign_pool> { char *name; ViewportSign sign; int32 x; @@ -27,8 +28,6 @@ struct Sign : PoolItem<Sign, SignID, &_Sign_pool> { /** Destroy the sign */ ~Sign(); - - inline bool IsValid() const { return this->owner != INVALID_OWNER; } }; #define FOR_ALL_SIGNS_FROM(var, start) FOR_ALL_ITEMS_FROM(Sign, sign_index, var, start) |