mirror of https://github.com/OpenTTD/OpenTTD
Codechange: strongly type Subsidy
parent
3aa60fd479
commit
44a979559a
|
@ -15,7 +15,7 @@
|
||||||
#include "subsidy_type.h"
|
#include "subsidy_type.h"
|
||||||
#include "core/pool_type.hpp"
|
#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;
|
extern SubsidyPool _subsidy_pool;
|
||||||
|
|
||||||
/** Struct about subsidies, offered and awarded */
|
/** Struct about subsidies, offered and awarded */
|
||||||
|
|
|
@ -20,7 +20,7 @@ enum PartOfSubsidy : uint8_t {
|
||||||
};
|
};
|
||||||
DECLARE_ENUM_AS_BIT_SET(PartOfSubsidy)
|
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;
|
struct Subsidy;
|
||||||
|
|
||||||
#endif /* SUBSIDY_TYPE_H */
|
#endif /* SUBSIDY_TYPE_H */
|
||||||
|
|
Loading…
Reference in New Issue