| 22 | */ |
| 23 | template <class Tsource, class Tdest> |
| 24 | CargoPacket *CargoMovement<Tsource, Tdest>::Preprocess(CargoPacket *cp) |
| 25 | { |
| 26 | if (this->max_move < cp->Count()) { |
| 27 | cp = cp->Split(this->max_move); |
| 28 | this->max_move = 0; |
| 29 | } else { |
| 30 | this->max_move -= cp->Count(); |
| 31 | } |
| 32 | return cp; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Determines the amount of cargo to be removed from a packet and removes that |
no test coverage detected