* Removes a packet or part of it from the metadata. * @param cp Packet to be removed. * @param action MoveToAction of the packet (for updating the counts). * @param count Amount of cargo to be removed. */
| 359 | * @param count Amount of cargo to be removed. |
| 360 | */ |
| 361 | void VehicleCargoList::RemoveFromMeta(const CargoPacket *cp, MoveToAction action, uint count) |
| 362 | { |
| 363 | assert(count <= this->action_counts[action]); |
| 364 | this->AssertCountConsistency(); |
| 365 | this->RemoveFromCache(cp, count); |
| 366 | this->action_counts[action] -= count; |
| 367 | this->AssertCountConsistency(); |
| 368 | } |
| 369 | |
| 370 | /** |
| 371 | * Adds a packet to the metadata. |
no test coverage detected