Codechange: Replace order related FOR_ALL with range-based for loops

This commit is contained in:
glx
2019-12-17 01:35:29 +01:00
committed by Niels Martin Hansen
parent 41232f18c1
commit 9892d90b26
8 changed files with 27 additions and 73 deletions

View File

@@ -3664,9 +3664,8 @@ void DeleteStaleLinks(Station *from)
if (auto_distributed) {
/* Have all vehicles refresh their next hops before deciding to
* remove the node. */
OrderList *l;
std::vector<Vehicle *> vehicles;
FOR_ALL_ORDER_LISTS(l) {
for (OrderList *l : OrderList::Iterate()) {
bool found_from = false;
bool found_to = false;
for (Order *order = l->GetFirstOrder(); order != nullptr; order = order->next) {