MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / RemoveFromCache

Method RemoveFromCache

src/cargopacket.cpp:184–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 */
183template <class Tinst, class Tcont>
184void CargoList<Tinst, Tcont>::RemoveFromCache(const CargoPacket *cp, uint count)
185{
186 assert(count <= cp->count);
187 this->count -= count;
188 this->cargo_periods_in_transit -= static_cast<uint64_t>(cp->periods_in_transit) * count;
189}
190
191/**
192 * Update the cache to reflect adding of this packet.

Callers 3

RemoveFromMetaMethod · 0.80
TruncateMethod · 0.80
operator()Method · 0.80

Calls 1

GetFeederShareMethod · 0.45

Tested by

no test coverage detected