Fix iterator invalidation issues in CargoPacketList actions

See: #48
This commit is contained in:
Jonathan G Rennison
2018-04-30 16:55:07 +01:00
parent e0126a1fbc
commit 1cc545c816
4 changed files with 48 additions and 7 deletions

View File

@@ -13,6 +13,7 @@
#define CARGOACTION_H
#include "cargopacket.h"
#include <vector>
/**
* Abstract action of removing cargo from a vehicle or a station.
@@ -140,7 +141,7 @@ public:
{
assert(this->max_move <= source->ActionCount(VehicleCargoList::MTA_TRANSFER));
}
bool operator()(CargoPacket *cp);
bool operator()(CargoPacket *cp, std::vector<CargoPacket *> &front_insert);
};
#endif /* CARGOACTION_H */