Codechange: strongly type Subsidy

This commit is contained in:
Rubidium 2025-02-01 00:30:54 +01:00 committed by rubidium42
parent 3aa60fd479
commit 44a979559a
2 changed files with 2 additions and 2 deletions

View File

@ -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 */

View File

@ -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 */