summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2017-03-20 17:49:44 +0000
committerpeter1138 <peter1138@openttd.org>2017-03-20 17:49:44 +0000
commit5951d2406e48449d517974e0edfd0a8cb847d144 (patch)
treed6c2da220d80dffbdece86b78ea78ac37945637c /src/train_cmd.cpp
parent890a44f130d2257a98b09a224791d26fee274554 (diff)
downloadopenttd-5951d2406e48449d517974e0edfd0a8cb847d144.tar.xz
(svn r27811) -Change: Remove unused parameters in FreeTrainTrackReservation
FreeTrainTrackReservation is always called with INVALID_TILE and INVALID_TRACKDIR as second and third arguments, so remove them and just use those constants instead. (cirdan)
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 4a279bb7e..608ce2fee 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -2254,16 +2254,14 @@ static void ClearPathReservation(const Train *v, TileIndex tile, Trackdir track_
/**
* Free the reserved path in front of a vehicle.
* @param v %Train owning the reserved path.
- * @param origin %Tile to start clearing (if #INVALID_TILE, use the current tile of \a v).
- * @param orig_td Track direction (if #INVALID_TRACKDIR, use the track direction of \a v).
*/
-void FreeTrainTrackReservation(const Train *v, TileIndex origin, Trackdir orig_td)
+void FreeTrainTrackReservation(const Train *v)
{
assert(v->IsFrontEngine());
- TileIndex tile = origin != INVALID_TILE ? origin : v->tile;
- Trackdir td = orig_td != INVALID_TRACKDIR ? orig_td : v->GetVehicleTrackdir();
- bool free_tile = tile != v->tile || !(IsRailStationTile(v->tile) || IsTileType(v->tile, MP_TUNNELBRIDGE));
+ TileIndex tile = v->tile;
+ Trackdir td = v->GetVehicleTrackdir();
+ bool free_tile = !(IsRailStationTile(v->tile) || IsTileType(v->tile, MP_TUNNELBRIDGE));
StationID station_id = IsRailStationTile(v->tile) ? GetStationIndex(v->tile) : INVALID_STATION;
/* Can't be holding a reservation if we enter a depot. */