aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/politics/Rule.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-07-19 21:35:31 +0200
committer GitHub <noreply@github.com>2024-07-19 21:35:31 +0200
commitd1f3a96b72dd06b5f97dd4643e5f016a02b42ea6 (patch)
tree38015e5729afbb98cf520e2cf26d8a4623d32f2f /src/openvic-simulation/politics/Rule.hpp
parente0518bee9b4c164f40716a8033b5e207c2060c0b (diff)
parent03647d2249f72b6545628bb844685f87c4581062 (diff)
Merge pull request #176 from OpenVicProject/format-cleanup
Cleanup: inheritance, const movable variables, code formatting
Diffstat (limited to 'src/openvic-simulation/politics/Rule.hpp')
-rw-r--r--src/openvic-simulation/politics/Rule.hpp7
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;