src/cargopacket.cpp
changeset 7374 6d9f00fc289a
parent 7130 91b21768f307
child 7380 3cfd7b197ce8
equal deleted inserted replaced
7373:e3aa9846bc0a 7374:6d9f00fc289a
    19 	/* We don't use FOR_ALL here, because FOR_ALL skips invalid items.
    19 	/* We don't use FOR_ALL here, because FOR_ALL skips invalid items.
    20 	 *  TODO - This is just a temporary stage, this will be removed. */
    20 	 *  TODO - This is just a temporary stage, this will be removed. */
    21 	for (CargoPacket *cp = GetCargoPacket(cpart_item); cp != NULL; cp = (cp->index + 1U < GetCargoPacketPoolSize()) ? GetCargoPacket(cp->index + 1U) : NULL) cp->index = cpart_item++;
    21 	for (CargoPacket *cp = GetCargoPacket(cpart_item); cp != NULL; cp = (cp->index + 1U < GetCargoPacketPoolSize()) ? GetCargoPacket(cp->index + 1U) : NULL) cp->index = cpart_item++;
    22 }
    22 }
    23 
    23 
    24 static void CargoPacketPoolCleanBlock(uint cpart_item, uint end_item)
    24 static void CargoPacketPoolCleanBlock(uint start_item, uint end_item)
    25 {
    25 {
    26 	for (uint i = cpart_item; i <= end_item; i++) {
    26 	for (uint i = start_item; i <= end_item; i++) {
    27 		CargoPacket *cp = GetCargoPacket(i);
    27 		CargoPacket *cp = GetCargoPacket(i);
    28 		if (cp->IsValid()) cp->~CargoPacket();
    28 		if (cp->IsValid()) cp->~CargoPacket();
    29 	}
    29 	}
    30 }
    30 }
    31 
    31