From 177a0051eceb657ad838048d9532e306e18ce4e5 Mon Sep 17 00:00:00 2001 From: wvpm <24685035+wvpm@users.noreply.github.com> Date: Wed, 10 Jan 2024 21:12:43 +0100 Subject: Case insensitive modifiers & added more --- src/openvic-simulation/pop/Pop.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/openvic-simulation/pop') diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp index d15bd2e..5afcb18 100644 --- a/src/openvic-simulation/pop/Pop.cpp +++ b/src/openvic-simulation/pop/Pop.cpp @@ -319,15 +319,17 @@ bool PopManager::load_pop_into_vector( bool PopManager::generate_modifiers(ModifierManager& modifier_manager) const { bool ret = true; + for (Strata const& strata : get_stratas()) { - const auto strata_modifier = [&modifier_manager, &ret, &strata](std::string_view suffix, bool positive_good) -> void { + const auto strata_modifier = [&modifier_manager, &ret, &strata]( + std::string_view suffix, bool is_positive_good + ) -> void { ret &= modifier_manager.add_modifier_effect( - StringUtils::append_string_views(strata.get_identifier(), suffix), positive_good + StringUtils::append_string_views(strata.get_identifier(), suffix), is_positive_good ); }; strata_modifier("_income_modifier", true); - strata_modifier("_savings_modifier", true); strata_modifier("_vote", true); strata_modifier("_life_needs", false); -- cgit v1.2.3-56-ga3b1