summaryrefslogtreecommitdiff
path: root/depot.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-22 17:13:49 +0000
committertruelight <truelight@openttd.org>2006-08-22 17:13:49 +0000
commitbdc1d681a77ab4ca3342023c5314b565c2e21b86 (patch)
tree6fd89f2a96b8f71b4b34dda81300e4dd18bd4e6e /depot.c
parent8d436dee6975b5fccd26de5c3e2429414df63776 (diff)
downloadopenttd-bdc1d681a77ab4ca3342023c5314b565c2e21b86.tar.xz
(svn r6052) -Codechange: change OrderType (order->type) in a typedef
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better -Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
Diffstat (limited to 'depot.c')
-rw-r--r--depot.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/depot.c b/depot.c
index a9e788ed4..e092940b8 100644
--- a/depot.c
+++ b/depot.c
@@ -79,7 +79,6 @@ Depot *AllocateDepot(void)
*/
void DoDeleteDepot(TileIndex tile)
{
- Order order;
Depot *depot;
/* Get the depot */
@@ -92,9 +91,7 @@ void DoDeleteDepot(TileIndex tile)
depot->xy = 0;
/* Clear the depot from all order-lists */
- order.type = OT_GOTO_DEPOT;
- order.station = depot->index;
- DeleteDestinationFromVehicleOrder(order);
+ RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, depot->index);
/* Delete the depot-window */
DeleteWindowById(WC_VEHICLE_DEPOT, tile);