diff options
Diffstat (limited to 'src/saveload/cargopacket_sl.cpp')
-rw-r--r-- | src/saveload/cargopacket_sl.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/saveload/cargopacket_sl.cpp b/src/saveload/cargopacket_sl.cpp index 90aa33cf9..bb44c663f 100644 --- a/src/saveload/cargopacket_sl.cpp +++ b/src/saveload/cargopacket_sl.cpp @@ -58,8 +58,7 @@ if (IsSavegameVersionBefore(SLV_120)) { /* CargoPacket's source should be either INVALID_STATION or a valid station */ - CargoPacket *cp; - FOR_ALL_CARGOPACKETS(cp) { + for (CargoPacket *cp : CargoPacket::Iterate()) { if (!Station::IsValidID(cp->source)) cp->source = INVALID_STATION; } } @@ -112,9 +111,7 @@ const SaveLoad *GetCargoPacketDesc() */ static void Save_CAPA() { - CargoPacket *cp; - - FOR_ALL_CARGOPACKETS(cp) { + for (CargoPacket *cp : CargoPacket::Iterate()) { SlSetArrayIndex(cp->index); SlObject(cp, GetCargoPacketDesc()); } |