From bb81139c1fc7771e27a883160d94ac48e92c861c Mon Sep 17 00:00:00 2001 From: Rubidium Date: Mon, 17 Feb 2025 22:26:54 +0100 Subject: [PATCH] Codechange: explicitly initialise CargoPayment member variables --- src/economy_base.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/economy_base.h b/src/economy_base.h index 13ce2744b9..ca5e2ae7fe 100644 --- a/src/economy_base.h +++ b/src/economy_base.h @@ -23,13 +23,13 @@ extern CargoPaymentPool _cargo_payment_pool; */ struct CargoPayment : CargoPaymentPool::PoolItem<&_cargo_payment_pool> { /* CargoPaymentID index member of CargoPaymentPool is 4 bytes. */ - StationID current_station; ///< NOSAVE: The current station - Company *owner; ///< NOSAVE: The owner of the vehicle + StationID current_station = StationID::Invalid(); ///< NOSAVE: The current station + Company *owner = nullptr; ///< 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 + Vehicle *front = nullptr; ///< The front vehicle to do the payment of + Money route_profit = 0; ///< The amount of money to add/remove from the bank account + Money visual_profit = 0; ///< The visual profit to show + Money visual_transfer = 0; ///< The transfer credits to be shown /** Constructor for pool saveload */ CargoPayment() {}