Changeset - r27912:9307505907d5
[Not reviewed]
master
0 2 0
Peter Nelson - 8 months ago 2023-09-11 21:33:27
peter1138@openttd.org
Codechange: Shuffle CargoPayment members to reduce padding.
2 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -1188,8 +1188,8 @@ static void TriggerIndustryProduction(In
 
 * @param front The front of the train
 
 */
 
CargoPayment::CargoPayment(Vehicle *front) :
 
	front(front),
 
	current_station(front->last_station_visited)
 
	current_station(front->last_station_visited),
 
	front(front)
 
{
 
}
 

	
src/economy_base.h
Show inline comments
 
@@ -22,16 +22,16 @@ extern CargoPaymentPool _cargo_payment_p
 
 * Helper class to perform the cargo payment.
 
 */
 
struct CargoPayment : CargoPaymentPool::PoolItem<&_cargo_payment_pool> {
 
	/* CargoPaymentID index member of CargoPaymentPool is 4 bytes. */
 
	StationID current_station; ///< NOSAVE: The current station
 
	CargoID ct; ///< NOSAVE: The currently handled cargo type
 
	Company *owner; ///< NOSAVE: The owner of the vehicle
 

	
 
	Vehicle *front;        ///< The front vehicle to do the payment of
 
	Money route_profit;    ///< The amount of money to add/remove from the bank account
 
	Money visual_profit;   ///< The visual profit to show
 
	Money visual_transfer; ///< The transfer credits to be shown
 

	
 
	/* Unsaved variables */
 
	Company *owner;            ///< The owner of the vehicle
 
	StationID current_station; ///< The current station
 
	CargoID ct;                ///< The currently handled cargo type
 

	
 
	/** Constructor for pool saveload */
 
	CargoPayment() {}
 
	CargoPayment(Vehicle *front);
0 comments (0 inline, 0 general)