From 4803ca7462e4f1cd3d06fa74ad8a9ab08c21c5e5 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Fri, 31 Jan 2025 21:27:24 +0100 Subject: [PATCH] Codechange: strongly type CargoPayment --- src/economy_base.h | 2 +- src/economy_type.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/economy_base.h b/src/economy_base.h index 3acee50d5b..8f19b2788e 100644 --- a/src/economy_base.h +++ b/src/economy_base.h @@ -14,7 +14,7 @@ #include "company_type.h" /** Type of pool to store cargo payments in; little over 1 million. */ -typedef Pool CargoPaymentPool; +using CargoPaymentPool = Pool; /** The actual pool to store cargo payments in. */ extern CargoPaymentPool _cargo_payment_pool; diff --git a/src/economy_type.h b/src/economy_type.h index 24e2ef7d1c..07c60b75d1 100644 --- a/src/economy_type.h +++ b/src/economy_type.h @@ -12,6 +12,7 @@ #include "core/overflowsafe_type.hpp" #include "core/enum_type.hpp" +#include "core/pool_type.hpp" typedef OverflowSafeInt64 Money; @@ -254,6 +255,6 @@ static const uint ROAD_STOP_TRACKBIT_FACTOR = 2; static const uint LOCK_DEPOT_TILE_FACTOR = 2; struct CargoPayment; -typedef uint32_t CargoPaymentID; +using CargoPaymentID = PoolID; #endif /* ECONOMY_TYPE_H */