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/engine_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/engine_base.h')
-rw-r--r-- | src/engine_base.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/engine_base.h b/src/engine_base.h index e3e055164..3e53564e4 100644 --- a/src/engine_base.h +++ b/src/engine_base.h @@ -7,12 +7,13 @@ #include "engine_type.h" #include "economy_type.h" -#include "oldpool.h" +#include "core/pool.hpp" #include "core/smallvec_type.hpp" -DECLARE_OLD_POOL(Engine, Engine, 6, 10000) +typedef Pool<Engine, EngineID, 64, 64000> EnginePool; +extern EnginePool _engine_pool; -struct Engine : PoolItem<Engine, EngineID, &_Engine_pool> { +struct Engine : EnginePool::PoolItem<&_engine_pool> { char *name; ///< Custom name of engine Date intro_date; Date age; @@ -49,8 +50,6 @@ struct Engine : PoolItem<Engine, EngineID, &_Engine_pool> { Engine(VehicleType type, EngineID base); ~Engine(); - inline bool IsValid() const { return this->info.climates != 0; } - CargoID GetDefaultCargoType() const; bool CanCarryCargo() const; uint GetDisplayDefaultCapacity() const; |