summaryrefslogtreecommitdiff
path: root/src/waypoint.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/waypoint.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/waypoint.cpp')
-rw-r--r--src/waypoint.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index f35628492..96a9e5025 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -11,10 +11,11 @@
#include "waypoint.h"
#include "window_func.h"
#include "newgrf_station.h"
-#include "oldpool_func.h"
#include "order_func.h"
+#include "core/pool_func.hpp"
-DEFINE_OLD_POOL_GENERIC(Waypoint, Waypoint)
+WaypointPool _waypoint_pool("Waypoint");
+INSTANTIATE_POOL_METHODS(Waypoint)
/**
* Update all signs
@@ -79,11 +80,6 @@ void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype)
}
}
-Waypoint::Waypoint(TileIndex tile)
-{
- this->xy = tile;
-}
-
Waypoint::~Waypoint()
{
free(this->name);
@@ -93,11 +89,9 @@ Waypoint::~Waypoint()
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
RedrawWaypointSign(this);
- this->xy = INVALID_TILE;
}
void InitializeWaypoints()
{
- _Waypoint_pool.CleanPool();
- _Waypoint_pool.AddBlockToPool();
+ _waypoint_pool.CleanPool();
}