equal
deleted
inserted
replaced
272 } |
272 } |
273 days_in_transit = dit / count; |
273 days_in_transit = dit / count; |
274 source = (*packets.begin())->source; |
274 source = (*packets.begin())->source; |
275 } |
275 } |
276 |
276 |
277 /** Restore an array of cargo packets from a backup |
|
278 * The end of the row should be marked by an invalid packet |
|
279 */ |
|
280 void CargoPacket::RestoreBackup() const |
|
281 { |
|
282 for (const CargoPacket *cargo = this; cargo->IsValid(); cargo++) { |
|
283 CargoPacket *dest = GetCargoPacket(cargo->index); |
|
284 assert(!dest->IsValid()); |
|
285 memcpy(dest, cargo, sizeof(CargoPacket)); |
|
286 } |
|
287 } |
|