diff --git a/src/cargopacket.h b/src/cargopacket.h --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -63,7 +63,7 @@ struct CargoPacket : PoolItemindex + 1U < GetCargoPacketPoolSize()) ? GetCargoPacket(cp->index + 1U) : NULL) if (cp->IsValid()) +#define FOR_ALL_CARGOPACKETS_FROM(cp, start) for (cp = CargoPacket::Get(start); cp != NULL; cp = (cp->index + 1U < GetCargoPacketPoolSize()) ? CargoPacket::Get(cp->index + 1U) : NULL) if (cp->IsValid()) /** * Iterate over all _valid_ cargo packets from the begin of the pool