diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 3 | ||||
-rw-r--r-- | src/saveload/economy_sl.cpp | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index f979552be..eb438515b 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -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; } diff --git a/src/saveload/economy_sl.cpp b/src/saveload/economy_sl.cpp index 6737ac2f3..637d2529c 100644 --- a/src/saveload/economy_sl.cpp +++ b/src/saveload/economy_sl.cpp @@ -72,8 +72,7 @@ static const SaveLoad _cargopayment_desc[] = { static void Save_CAPY() { - CargoPayment *cp; - FOR_ALL_CARGO_PAYMENTS(cp) { + for (CargoPayment *cp : CargoPayment::Iterate()) { SlSetArrayIndex(cp->index); SlObject(cp, _cargopayment_desc); } @@ -91,8 +90,7 @@ static void Load_CAPY() static void Ptrs_CAPY() { - CargoPayment *cp; - FOR_ALL_CARGO_PAYMENTS(cp) { + for (CargoPayment *cp : CargoPayment::Iterate()) { SlObject(cp, _cargopayment_desc); } } |