diff options
Diffstat (limited to 'src/cargopacket.cpp')
-rw-r--r-- | src/cargopacket.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index f7d4348f9..012ae78f5 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -155,6 +155,16 @@ CargoList<Tinst>::~CargoList() } /** + * Empty the cargo list, but don't free the cargo packets; + * the cargo packets are cleaned by CargoPacket's CleanPool. + */ +template <class Tinst> +void CargoList<Tinst>::OnCleanPool() +{ + this->packets.clear(); +} + +/** * Update the cached values to reflect the removal of this packet. * Decreases count and days_in_transit. * @param cp Packet to be removed from cache. |