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

Method AddToCache

src/cargopacket.cpp:197–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 */
196template <class Tinst, class Tcont>
197void CargoList<Tinst, Tcont>::AddToCache(const CargoPacket *cp)
198{
199 this->count += cp->count;
200 this->cargo_periods_in_transit += static_cast<uint64_t>(cp->periods_in_transit) * cp->count;
201}
202
203/** Invalidates the cached data and rebuilds it. */
204template <class Tinst, class Tcont>

Callers 4

InvalidateCacheMethod · 0.80
AddToMetaMethod · 0.80
AppendMethod · 0.80
operator()Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected