From 928c521599b2b18e8964aeb445c3ca5a55bacbd1 Mon Sep 17 00:00:00 2001 From: hop311 Date: Wed, 17 Jul 2024 00:01:03 +0100 Subject: Use IndexedMap + helper function support --- extension/src/openvic-extension/singletons/PopulationMenu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extension/src/openvic-extension/singletons/PopulationMenu.cpp') diff --git a/extension/src/openvic-extension/singletons/PopulationMenu.cpp b/extension/src/openvic-extension/singletons/PopulationMenu.cpp index 1237e86..db2ac53 100644 --- a/extension/src/openvic-extension/singletons/PopulationMenu.cpp +++ b/extension/src/openvic-extension/singletons/PopulationMenu.cpp @@ -407,12 +407,12 @@ void MenuSingleton::_population_menu_update_filtered_pops() { population_menu.distributions[0][&pop->get_type()] += pop->get_size(); population_menu.distributions[1][&pop->get_religion()] += pop->get_size(); population_menu.distributions[2] += - cast_map(pop->get_ideologies() * static_cast(pop->get_size())); + pop->get_ideologies() * static_cast(static_cast(pop->get_size())); population_menu.distributions[3][&pop->get_culture()] += pop->get_size(); population_menu.distributions[4] += cast_map(pop->get_issues() * static_cast(pop->get_size())); population_menu.distributions[5] += - cast_map(pop->get_votes() * static_cast(pop->get_size())); + pop->get_votes() * static_cast(static_cast(pop->get_size())); } for (fixed_point_map_t& distribution : population_menu.distributions) { @@ -467,7 +467,7 @@ MenuSingleton::sort_func_t MenuSingleton::_get_population_menu_sort_func(populat }; case SORT_IDEOLOGY: return [](Pop const* a, Pop const* b) -> bool { - return sorted_fixed_map_less_than(a->get_ideologies(), b->get_ideologies()); + return sorted_indexed_map_less_than(a->get_ideologies(), b->get_ideologies()); }; case SORT_ISSUES: return [](Pop const* a, Pop const* b) -> bool { -- cgit v1.2.3-56-ga3b1