(svn r12815) -Codechange: reshuffle some variables in the CargoPacket struct saving 4 of 36 bytes with a 32 bit compiler and 8 of 48 bytes on 64 bit compiler per cargo packets. There are generally more cargopackets in game than vehicles.
authorrubidium
Mon, 21 Apr 2008 09:20:42 +0000
changeset 9016 8d7d2a71fda5
parent 9015 5f39c06a47df
child 9017 3d422fffe39c
(svn r12815) -Codechange: reshuffle some variables in the CargoPacket struct saving 4 of 36 bytes with a 32 bit compiler and 8 of 48 bytes on 64 bit compiler per cargo packets. There are generally more cargopackets in game than vehicles.
src/cargopacket.h
--- a/src/cargopacket.h	Mon Apr 21 08:35:27 2008 +0000
+++ b/src/cargopacket.h	Mon Apr 21 09:20:42 2008 +0000
@@ -22,13 +22,13 @@
  * Container for cargo from the same location and time
  */
 struct CargoPacket : PoolItem<CargoPacket, CargoPacketID, &_CargoPacket_pool> {
-	StationID source;       ///< The station where the cargo came from first
+	Money feeder_share;     ///< Value of feeder pickup to be paid for on delivery of cargo
 	TileIndex source_xy;    ///< The origin of the cargo (first station in feeder chain)
 	TileIndex loaded_at_xy; ///< Location where this cargo has been loaded into the vehicle
+	StationID source;       ///< The station where the cargo came from first
 
 	uint16 count;           ///< The amount of cargo in this packet
 	byte days_in_transit;   ///< Amount of days this packet has been in transit
-	Money feeder_share;     ///< Value of feeder pickup to be paid for on delivery of cargo
 	bool paid_for;          ///< Have we been paid for this cargo packet?
 
 	/**