summaryrefslogtreecommitdiff
path: root/src/engine.cpp
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/engine.cpp
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/engine.cpp')
-rw-r--r--src/engine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 24918c11c..262729c19 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -18,15 +18,16 @@
#include "date_func.h"
#include "autoreplace_gui.h"
#include "string_func.h"
-#include "oldpool_func.h"
#include "ai/ai.hpp"
#include "vehicle_func.h"
#include "settings_type.h"
+#include "core/pool_func.hpp"
#include "table/strings.h"
#include "table/engines.h"
-DEFINE_OLD_POOL_GENERIC(Engine, Engine)
+EnginePool _engine_pool("Engine");
+INSTANTIATE_POOL_METHODS(Engine)
EngineOverrideManager _engine_mngr;
@@ -356,7 +357,7 @@ EngineID EngineOverrideManager::GetID(VehicleType type, uint16 grf_local_id, uin
*/
void SetCachedEngineCounts()
{
- uint engines = Engine::GetPoolSize();
+ size_t engines = Engine::GetPoolSize();
/* Set up the engine count for all companies */
Company *c;
@@ -392,8 +393,7 @@ void SetCachedEngineCounts()
void SetupEngines()
{
- _Engine_pool.CleanPool();
- _Engine_pool.AddBlockToPool();
+ _engine_pool.CleanPool();
assert(_engine_mngr.Length() >= _engine_mngr.NUM_DEFAULT_ENGINES);
const EngineIDMapping *end = _engine_mngr.End();