aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-10-20 10:16:38 +0200
committer hop311 <hop3114@gmail.com>2023-10-20 10:16:38 +0200
commitd2e91829abc8dd46fa4685d1cab89ef6fe907471 (patch)
tree3a3c32d8f631fefda101ec3b47147da3bb81e297 /src/openvic-simulation/pop
parentab696e8469b1417b69d6b3aa5d46a69d370613a0 (diff)
Separated node->string and string->value parsing
Diffstat (limited to 'src/openvic-simulation/pop')
-rw-r--r--src/openvic-simulation/pop/Culture.cpp2
-rw-r--r--src/openvic-simulation/pop/Pop.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic-simulation/pop/Culture.cpp b/src/openvic-simulation/pop/Culture.cpp
index 8a0ca37..85c96a0 100644
--- a/src/openvic-simulation/pop/Culture.cpp
+++ b/src/openvic-simulation/pop/Culture.cpp
@@ -119,7 +119,7 @@ bool CultureManager::_load_culture_group(size_t& total_expected_cultures,
bool ret = expect_dictionary_keys_and_default(
increment_callback(total_expected_cultures),
"leader", ONE_EXACTLY, expect_identifier(assign_variable_callback(leader)),
- "unit", ZERO_OR_ONE, expect_identifier(expect_graphical_culture_type_identifier(assign_variable_callback_pointer(unit_graphical_culture_type))),
+ "unit", ZERO_OR_ONE, expect_graphical_culture_type_identifier(assign_variable_callback_pointer(unit_graphical_culture_type)),
"union", ZERO_OR_ONE, success_callback,
"is_overseas", ZERO_OR_ONE, expect_bool(assign_variable_callback(is_overseas))
)(culture_group_node);
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp
index 5b1ce02..5286393 100644
--- a/src/openvic-simulation/pop/Pop.cpp
+++ b/src/openvic-simulation/pop/Pop.cpp
@@ -221,8 +221,8 @@ bool PopManager::load_pop_into_province(Province& province, std::string_view pop
Religion const* religion = nullptr;
Pop::pop_size_t size = 0;
bool ret = expect_dictionary_keys(
- "culture", ONE_EXACTLY, expect_identifier(culture_manager.expect_culture_identifier(assign_variable_callback_pointer(culture))),
- "religion", ONE_EXACTLY, expect_identifier(religion_manager.expect_religion_identifier(assign_variable_callback_pointer(religion))),
+ "culture", ONE_EXACTLY, culture_manager.expect_culture_identifier(assign_variable_callback_pointer(culture)),
+ "religion", ONE_EXACTLY, religion_manager.expect_religion_identifier(assign_variable_callback_pointer(religion)),
"size", ONE_EXACTLY, expect_uint(assign_variable_callback(size)),
"militancy", ZERO_OR_ONE, success_callback,
"rebel_type", ZERO_OR_ONE, success_callback