Changeset - r9980:065e893f6840
[Not reviewed]
master
0 2 0
celestar - 16 years ago 2008-08-23 09:31:53
celestar@openttd.org
(svn r14137) -Codechange: Remove a now unused member of CargoPacket
2 files changed with 0 insertions and 13 deletions:
0 comments (0 inline, 0 general)
src/cargopacket.cpp
Show inline comments
 
@@ -271,17 +271,6 @@ void CargoList::InvalidateCache()
 
		feeder_share += (*it)->feeder_share;
 
	}
 
	days_in_transit = dit / count;
 
	source = (*packets.begin())->source;
 
}
 

	
 
/** Restore an array of cargo packets  from a backup
 
 * The end of the row should be marked by an invalid packet
 
 */
 
void CargoPacket::RestoreBackup() const
 
{
 
	for (const CargoPacket *cargo = this; cargo->IsValid(); cargo++) {
 
		CargoPacket *dest = GetCargoPacket(cargo->index);
 
		assert(!dest->IsValid());
 
		memcpy(dest, cargo, sizeof(CargoPacket));
 
	}
 
}
src/cargopacket.h
Show inline comments
 
@@ -53,14 +53,12 @@ struct CargoPacket : PoolItem<CargoPacke
 
	 * Checks whether the cargo packet is from (exactly) the same source
 
	 * in time and location.
 
	 * @param cp the cargo packet to compare to
 
	 * @return true if and only if days_in_transit and source_xy are equal
 
	 */
 
	bool SameSource(const CargoPacket *cp) const;
 

	
 
	void RestoreBackup() const;
 
};
 

	
 
/**
 
 * Iterate over all _valid_ cargo packets from the given start
 
 * @param cp    the variable used as "iterator"
 
 * @param start the cargo packet ID of the first packet to iterate over
0 comments (0 inline, 0 general)