summaryrefslogtreecommitdiff
path: root/src/waypoint.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-17 21:06:06 +0000
committerrubidium <rubidium@openttd.org>2009-07-17 21:06:06 +0000
commit4e5af51d1f56bc303dde2290a12cc219403b9c66 (patch)
tree216e244c8b6fcf4ca800797b064092436bcf98f0 /src/waypoint.cpp
parentd8f16ea1994ecebdb153c58350b3a044a6d43e57 (diff)
downloadopenttd-4e5af51d1f56bc303dde2290a12cc219403b9c66.tar.xz
(svn r16864) -Codechange: make Waypoints a subclass of BaseStation.
Diffstat (limited to 'src/waypoint.cpp')
-rw-r--r--src/waypoint.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index 04b71056e..acfda8334 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -43,27 +43,6 @@ void WaypointsDailyLoop()
}
/**
- * This hacks together some dummy one-shot Station structure for a waypoint.
- * @param tile on which to work
- * @return pointer to a Station
- */
-Station *ComposeWaypointStation(TileIndex tile)
-{
- Waypoint *wp = Waypoint::GetByTile(tile);
-
- /* instead of 'static Station stat' use byte array to avoid Station's destructor call upon exit. As
- * a side effect, the station is not constructed now. */
- static byte stat_raw[sizeof(Station)];
- static Station &stat = *(Station*)stat_raw;
-
- stat.train_tile = stat.xy = wp->xy;
- stat.town = wp->town;
- stat.build_date = wp->build_date;
-
- return &stat;
-}
-
-/**
* Draw a waypoint
* @param x coordinate
* @param y coordinate
@@ -82,8 +61,6 @@ void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype)
Waypoint::~Waypoint()
{
- free(this->name);
-
if (CleaningPool()) return;
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);