diff options
author | hop311 <hop3114@gmail.com> | 2024-07-19 20:02:25 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-07-19 20:02:25 +0200 |
commit | 03647d2249f72b6545628bb844685f87c4581062 (patch) | |
tree | 435dde45bb17dc12e74cc79bd5f25cc7a7ef8dca /src/openvic-simulation/politics/Rule.hpp | |
parent | a673f89bb2705826b1c646365eab1775727372b7 (diff) |
Cleanup: inheritance, const movable variables, code formattingformat-cleanup
Diffstat (limited to 'src/openvic-simulation/politics/Rule.hpp')
-rw-r--r-- | src/openvic-simulation/politics/Rule.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/openvic-simulation/politics/Rule.hpp b/src/openvic-simulation/politics/Rule.hpp index 70a59e8..518c555 100644 --- a/src/openvic-simulation/politics/Rule.hpp +++ b/src/openvic-simulation/politics/Rule.hpp @@ -7,7 +7,8 @@ namespace OpenVic { struct RuleManager; struct BuildingTypeManager; - struct Rule : HasIdentifier { + /* The index of the Rule within its group, used to determine precedence in mutually exclusive rule groups. */ + struct Rule : HasIdentifier, HasIndex<> { friend struct RuleManager; enum class rule_group_t : uint8_t { @@ -27,10 +28,8 @@ namespace OpenVic { private: const rule_group_t PROPERTY(group); - /* The index of the Rule within its group, used to determine precedence in mutually exclusive rule groups. */ - const size_t PROPERTY(index); - Rule(std::string_view new_identifier, rule_group_t new_group, size_t new_index); + Rule(std::string_view new_identifier, rule_group_t new_group, index_t new_index); public: Rule(Rule&&) = default; |