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

Method Merge

src/cargopacket.cpp:109–114  ·  view source on GitHub ↗

* Merge another packet into this one. * @param cp Packet to be merged in. */

Source from the content-addressed store, hash-verified

107 * @param cp Packet to be merged in.
108 */
109void CargoPacket::Merge(CargoPacket *cp)
110{
111 this->count += cp->count;
112 this->feeder_share += cp->feeder_share;
113 delete cp;
114}
115
116/**
117 * Reduce the packet by the given amount and remove the feeder share.

Callers 2

IncreaseStatsFunction · 0.45
TryMergeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected