diff options
author | fonsinchen <fonsinchen@openttd.org> | 2013-08-20 21:22:35 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2013-08-20 21:22:35 +0000 |
commit | 5c0b766ed95bd2d5557e1fa05dfc199ced5a18bf (patch) | |
tree | cf2917557dbfd237ca2a70d66cb57023a446c970 /src/vehicle.cpp | |
parent | d8365c63fd56352f07418bd079a971c043fa13b8 (diff) | |
download | openttd-5c0b766ed95bd2d5557e1fa05dfc199ced5a18bf.tar.xz |
(svn r25736) -Codechange: move condition prediction out of GetNextStoppingOrder so that we can access both branches in calling code
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 8a21b7ce9..9dc2e8844 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2156,8 +2156,8 @@ void Vehicle::RefreshNextHopsStats() const Order *first = this->GetOrder(this->cur_implicit_order_index); - /* Make sure the first order is a station order. */ - first = this->orders.list->GetNextStoppingOrder(this, first, 0); + /* Make sure the first order is a useful order. */ + first = this->orders.list->GetNextDecisionNode(first, 0); if (first == NULL) return; const Order *cur = first; @@ -2231,7 +2231,7 @@ void Vehicle::RefreshNextHopsStats() /* Reassign next with the following stop. This can be a station or a * depot. Allow the order list to be walked twice so that we can * reassign "first" below without afterwards terminating early here. */ - next = this->orders.list->GetNextStoppingOrder(this, + next = this->orders.list->GetNextDecisionNode( this->orders.list->GetNext(next), hops++ / 2); if (next == NULL) break; |