aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop/Culture.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-22 21:02:58 +0100
committer hop311 <hop3114@gmail.com>2024-01-23 23:14:53 +0100
commit268a6948c0400905dfc335427395519689f067f5 (patch)
treeb30e9b5774130552fe97e27deaf0370d83920c43 /src/openvic-simulation/pop/Culture.cpp
parentd4e597da089a81f719a9c33b46111d1c2c590124 (diff)
Added reserve_more, expect_dictionary_key[s|_map]_reserve_length[_and_default]reserve_more
Diffstat (limited to 'src/openvic-simulation/pop/Culture.cpp')
-rw-r--r--src/openvic-simulation/pop/Culture.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/openvic-simulation/pop/Culture.cpp b/src/openvic-simulation/pop/Culture.cpp
index 53273f5..9466e9f 100644
--- a/src/openvic-simulation/pop/Culture.cpp
+++ b/src/openvic-simulation/pop/Culture.cpp
@@ -74,7 +74,8 @@ bool CultureManager::add_culture(
}
bool CultureManager::load_graphical_culture_type_file(ast::NodeCPtr root) {
- const bool ret = expect_list_reserve_length(graphical_culture_types,
+ const bool ret = expect_list_reserve_length(
+ graphical_culture_types,
expect_identifier(std::bind_front(&CultureManager::add_graphical_culture_type, this))
)(root);
lock_graphical_culture_types();
@@ -169,7 +170,7 @@ bool CultureManager::load_culture_file(CountryManager const& country_manager, as
}
)(root);
lock_culture_groups();
- cultures.reserve(cultures.size() + total_expected_cultures);
+ reserve_more_cultures(total_expected_cultures);
ret &= expect_culture_group_dictionary(
[this, &country_manager](CultureGroup const& culture_group, ast::NodeCPtr culture_group_value) -> bool {