From f83e869def6608f64606aead24ad1cfbb6f5c72a Mon Sep 17 00:00:00 2001 From: hop311 Date: Tue, 16 Jul 2024 23:57:50 +0100 Subject: Add IndexedMap and use in low key count, high value density cases --- src/openvic-simulation/map/ProvinceInstance.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/openvic-simulation/map/ProvinceInstance.hpp') diff --git a/src/openvic-simulation/map/ProvinceInstance.hpp b/src/openvic-simulation/map/ProvinceInstance.hpp index a4f9e98..4398cd4 100644 --- a/src/openvic-simulation/map/ProvinceInstance.hpp +++ b/src/openvic-simulation/map/ProvinceInstance.hpp @@ -21,7 +21,6 @@ namespace OpenVic { struct Religion; struct BuildingTypeManager; struct ProvinceHistoryEntry; - struct IdeologyManager; struct IssueManager; template @@ -61,12 +60,15 @@ namespace OpenVic { std::vector PROPERTY(pops); Pop::pop_size_t PROPERTY(total_population); - fixed_point_map_t PROPERTY(pop_type_distribution); - fixed_point_map_t PROPERTY(ideology_distribution); + IndexedMap PROPERTY(pop_type_distribution); + IndexedMap PROPERTY(ideology_distribution); fixed_point_map_t PROPERTY(culture_distribution); fixed_point_map_t PROPERTY(religion_distribution); - ProvinceInstance(ProvinceDefinition const& new_province_definition); + ProvinceInstance( + ProvinceDefinition const& new_province_definition, decltype(pop_type_distribution)::keys_t const& pop_type_keys, + decltype(ideology_distribution)::keys_t const& ideology_keys + ); void _add_pop(Pop&& pop); void _update_pops(); @@ -116,8 +118,6 @@ namespace OpenVic { bool setup(BuildingTypeManager const& building_type_manager); bool apply_history_to_province(ProvinceHistoryEntry const* entry); - void setup_pop_test_values( - IdeologyManager const& ideology_manager, IssueManager const& issue_manager, CountryDefinition const& country - ); + void setup_pop_test_values(IssueManager const& issue_manager); }; } -- cgit v1.2.3-56-ga3b1