Mercurial > hg > openttd
diff src/yapf/yapf_road.cpp @ 8961:b33bcd7fa037 draft
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
author | smatz <smatz@openttd.org> |
---|---|
date | Thu, 17 Apr 2008 18:24:45 +0000 |
parents | 454ba10a0cff |
children | 322e2779f67a |
line wrap: on
line diff
--- a/src/yapf/yapf_road.cpp +++ b/src/yapf/yapf_road.cpp @@ -87,7 +87,7 @@ if (v->current_order.IsType(OT_GOTO_STATION) && tile == v->dest_tile) break; // stop if we have just entered the depot - if (IsDepotTypeTile(tile, TRANSPORT_ROAD) && trackdir == DiagdirToDiagTrackdir(ReverseDiagDir(GetRoadDepotDirection(tile)))) { + if (IsRoadDepotTile(tile) && trackdir == DiagdirToDiagTrackdir(ReverseDiagDir(GetRoadDepotDirection(tile)))) { // next time we will reverse and leave the depot break; } @@ -148,7 +148,7 @@ /// Called by YAPF to detect if node ends in the desired destination FORCEINLINE bool PfDetectDestination(Node& n) { - bool bDest = IsDepotTypeTile(n.m_segment_last_tile, TRANSPORT_ROAD); + bool bDest = IsRoadDepotTile(n.m_segment_last_tile); return bDest; } @@ -370,7 +370,7 @@ // get found depot tile Node *n = Yapf().GetBestNode(); TileIndex depot_tile = n->m_segment_last_tile; - assert(IsDepotTypeTile(depot_tile, TRANSPORT_ROAD)); + assert(IsRoadDepotTile(depot_tile)); Depot* ret = GetDepotByTile(depot_tile); return ret; } @@ -439,7 +439,7 @@ return NULL; // handle the case when our vehicle is already in the depot tile - if (IsTileType(tile, MP_ROAD) && IsDepotTypeTile(tile, TRANSPORT_ROAD)) { + if (IsRoadDepotTile(tile)) { // only what we need to return is the Depot* return GetDepotByTile(tile); }