diff options
Diffstat (limited to 'src/cargopacket.h')
-rw-r--r-- | src/cargopacket.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cargopacket.h b/src/cargopacket.h index bbad42bff..9d8251550 100644 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -169,6 +169,20 @@ private: List packets; ///< The cargo packets in this list + /** + * Update the cache to reflect adding of this packet. + * Increases count, feeder share and days_in_transit + * @param cp a new packet to be inserted + */ + void AddToCache(const CargoPacket *cp); + + /** + * Update the cached values to reflect the removal of this packet. + * Decreases count, feeder share and days_in_transit + * @param cp Packet to be removed from cache + */ + void RemoveFromCache(const CargoPacket *cp); + public: /** The stations, via GoodsEntry, have a CargoList. */ friend const struct SaveLoad *GetGoodsDesc(); |