aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/politics/Issue.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-10-13 10:16:44 +0200
committer GitHub <noreply@github.com>2023-10-13 10:16:44 +0200
commit32fdf7c38b2e56339a2fffa71a7a61a854759e2c (patch)
tree4ad745778dea488ad10509cf17d349c3ef0cc229 /src/openvic-simulation/politics/Issue.cpp
parentbb22324da1225a0ac458c1d69893bb3bd28bd6b7 (diff)
parentd95c3c9da75018e3e959e5493ebd9c520e00bf7a (diff)
Merge pull request #50 from OpenVicProject/changes
Lots of accumulated changes
Diffstat (limited to 'src/openvic-simulation/politics/Issue.cpp')
-rw-r--r--src/openvic-simulation/politics/Issue.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/openvic-simulation/politics/Issue.cpp b/src/openvic-simulation/politics/Issue.cpp
index 73978ee..3f2fd10 100644
--- a/src/openvic-simulation/politics/Issue.cpp
+++ b/src/openvic-simulation/politics/Issue.cpp
@@ -122,13 +122,10 @@ bool IssueManager::_load_issue(std::string_view identifier, IssueGroup const* gr
bool IssueManager::_load_reform_group(size_t& expected_reforms, std::string_view identifier, ReformType const* type, ast::NodeCPtr node) {
bool ordered = false, administrative = false;
- bool ret = expect_dictionary_keys_and_length(
- [&expected_reforms](size_t size) -> size_t {
- expected_reforms += size;
- return size;
- }, ALLOW_OTHER_KEYS,
- "next_step_only", ZERO_OR_ONE, decrement_callback(expected_reforms, expect_bool(assign_variable_callback(ordered))),
- "administrative", ZERO_OR_ONE, decrement_callback(expected_reforms, expect_bool(assign_variable_callback(administrative)))
+ bool ret = expect_dictionary_keys_and_default(
+ increment_callback(expected_reforms),
+ "next_step_only", ZERO_OR_ONE, expect_bool(assign_variable_callback(ordered)),
+ "administrative", ZERO_OR_ONE, expect_bool(assign_variable_callback(administrative))
)(node);
ret &= add_reform_group(identifier, type, ordered, administrative);
return ret;