mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
Codechange: strongly type Subsidy
This commit is contained in:
parent
3aa60fd479
commit
44a979559a
@ -15,7 +15,7 @@
|
||||
#include "subsidy_type.h"
|
||||
#include "core/pool_type.hpp"
|
||||
|
||||
typedef Pool<Subsidy, SubsidyID, 1, 256> SubsidyPool;
|
||||
using SubsidyPool = Pool<Subsidy, SubsidyID, 1, SubsidyID::End().base()>;
|
||||
extern SubsidyPool _subsidy_pool;
|
||||
|
||||
/** Struct about subsidies, offered and awarded */
|
||||
|
@ -20,7 +20,7 @@ enum PartOfSubsidy : uint8_t {
|
||||
};
|
||||
DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy)
|
||||
|
||||
typedef uint16_t SubsidyID; ///< ID of a subsidy
|
||||
using SubsidyID = PoolID<uint16_t, struct SubsidyIDTag, 256, 0xFFFF>; ///< ID of a subsidy
|
||||
struct Subsidy;
|
||||
|
||||
#endif /* SUBSIDY_TYPE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user