diff options
author | rubidium <rubidium@openttd.org> | 2009-09-10 14:37:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-09-10 14:37:55 +0000 |
commit | 860a538adc56a678f640f606692ea7ca00c8d424 (patch) | |
tree | 70ac11ef8b475179092b2a435fa768d761bcc3b5 /src/roadveh_cmd.cpp | |
parent | 751ea62f442f0a8b1623e3df0c0ac5971f776d40 (diff) | |
download | openttd-860a538adc56a678f640f606692ea7ca00c8d424.tar.xz |
(svn r17495) -Codechange: replace 'Depot::Get(GetDepotIndex(tile))->index' with GetDepotIndex(tile)
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 11584d08e..8bafe33ce 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -436,7 +436,7 @@ bool RoadVehicle::FindClosestDepot(TileIndex *location, DestinationID *destinati if (rfdd.best_length == UINT_MAX) return false; if (location != NULL) *location = rfdd.tile; - if (destination != NULL) *destination = Depot::GetByTile(rfdd.tile)->index; + if (destination != NULL) *destination = GetDepotIndex(rfdd.tile); return true; } @@ -1850,7 +1850,7 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v) return; } - const Depot *depot = Depot::GetByTile(rfdd.tile); + DepotID depot = GetDepotIndex(rfdd.tile); if (v->current_order.IsType(OT_GOTO_DEPOT) && v->current_order.GetNonStopType() & ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS && @@ -1861,7 +1861,7 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v) if (v->current_order.IsType(OT_LOADING)) v->LeaveStation(); ClearSlot(v); - v->current_order.MakeGoToDepot(depot->index, ODTFB_SERVICE); + v->current_order.MakeGoToDepot(depot, ODTFB_SERVICE); v->dest_tile = rfdd.tile; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } |