diff options
author | hop311 <hop3114@gmail.com> | 2023-10-12 21:19:00 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-10-12 21:19:00 +0200 |
commit | e50c67eb1aaa54f5fb31425f81616bea4e6b880a (patch) | |
tree | c4fbc6ee494f8ad33a8de36be5fc300165ce05fc /src/openvic-simulation/politics/Issue.cpp | |
parent | bb22324da1225a0ac458c1d69893bb3bd28bd6b7 (diff) |
Lots of accumulated changes
Diffstat (limited to 'src/openvic-simulation/politics/Issue.cpp')
-rw-r--r-- | src/openvic-simulation/politics/Issue.cpp | 11 |
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; |