mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
Codechange: strongly type CargoPayment
This commit is contained in:
parent
07dd5bf01d
commit
4803ca7462
@ -14,7 +14,7 @@
|
||||
#include "company_type.h"
|
||||
|
||||
/** Type of pool to store cargo payments in; little over 1 million. */
|
||||
typedef Pool<CargoPayment, CargoPaymentID, 512, 0xFF000> CargoPaymentPool;
|
||||
using CargoPaymentPool = Pool<CargoPayment, CargoPaymentID, 512, CargoPaymentID::End().base()>;
|
||||
/** The actual pool to store cargo payments in. */
|
||||
extern CargoPaymentPool _cargo_payment_pool;
|
||||
|
||||
|
@ -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<uint32_t, struct CargoPaymentIDTag, 0xFF000, 0xFFFFF>;
|
||||
|
||||
#endif /* ECONOMY_TYPE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user