Codechange: Replace FOR_ALL_CARGO_PAYMENTS with range-based for loops

This commit is contained in:
glx
2019-12-15 18:14:51 +01:00
committed by Niels Martin Hansen
parent fa9769f81a
commit 1c92ba8ebe
3 changed files with 3 additions and 19 deletions

View File

@@ -822,8 +822,7 @@ bool AfterLoadGame()
}
/* Fix the cache for cargo payments. */
CargoPayment *cp;
FOR_ALL_CARGO_PAYMENTS(cp) {
for (CargoPayment *cp : CargoPayment::Iterate()) {
cp->front->cargo_payment = cp;
cp->current_station = cp->front->last_station_visited;
}