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

Method AddToMeta

src/cargopacket.cpp:375–381  ·  view source on GitHub ↗

* Adds a packet to the metadata. * @param cp Packet to be added. * @param action MoveToAction of the packet. */

Source from the content-addressed store, hash-verified

373 * @param action MoveToAction of the packet.
374 */
375void VehicleCargoList::AddToMeta(const CargoPacket *cp, MoveToAction action)
376{
377 this->AssertCountConsistency();
378 this->AddToCache(cp);
379 this->action_counts[action] += cp->count;
380 this->AssertCountConsistency();
381}
382
383/**
384 * Ages the all cargo in this list.

Callers 2

AppendMethod · 0.95
operator()Method · 0.80

Calls 2

AddToCacheMethod · 0.80

Tested by

no test coverage detected