4343#include " openvic-simulation/types/Date.hpp"
4444#include " openvic-simulation/types/fixed_point/FixedPoint.hpp"
4545#include " openvic-simulation/types/IndexedFlatMap.hpp"
46- #include " openvic-simulation/types/PopSize.hpp"
46+ #include " openvic-simulation/population/PopSize.hpp"
47+ #include " openvic-simulation/population/PopSum.hpp"
4748#include " openvic-simulation/types/UnitBranchType.hpp"
4849#include " openvic-simulation/utility/Containers.hpp"
4950#include " openvic-simulation/utility/Logger.hpp"
@@ -1341,8 +1342,8 @@ void CountryInstance::_update_budget() {
13411342 OpenVic immediately updates both.
13421343 */
13431344
1344- pop_size_t total_non_colonial_population = 0 ;
1345- pop_size_t administrators = 0 ;
1345+ pop_sum_t total_non_colonial_population = 0 ;
1346+ pop_sum_t administrators = 0 ;
13461347 for (State const * const state_ptr : states) {
13471348 if (state_ptr == nullptr ) {
13481349 continue ;
@@ -1353,7 +1354,7 @@ void CountryInstance::_update_budget() {
13531354 continue ;
13541355 }
13551356
1356- IndexedFlatMap<PopType, pop_size_t > const & state_population_by_type = state.get_population_by_type ();
1357+ IndexedFlatMap<PopType, pop_sum_t > const & state_population_by_type = state.get_population_by_type ();
13571358
13581359 for (auto const & [pop_type, size] : state_population_by_type) {
13591360 if (pop_type.is_administrator ) {
@@ -1369,10 +1370,10 @@ void CountryInstance::_update_budget() {
13691370 } else {
13701371 administrator_percentage.set (fixed_point_t (administrators) / total_non_colonial_population);
13711372
1372- const fixed_point_t desired_administrators = desired_administrator_percentage.get_untracked () * total_non_colonial_population;
1373+ const fixed_point_t desired_administrators = desired_administrator_percentage.get_untracked () * type_safe::get ( total_non_colonial_population) ;
13731374 const fixed_point_t administrative_efficiency_from_administrators_unclamped = std::min (
13741375 fixed_point_t::mul_div (
1375- administrators,
1376+ type_safe::get ( administrators) ,
13761377 fixed_point_t ::_1 + get_modifier_effect_value (*modifier_effect_cache.get_administrative_efficiency ()),
13771378 desired_administrators
13781379 )
@@ -1398,7 +1399,7 @@ void CountryInstance::_update_budget() {
13981399 projected_education_spending_unscaled_by_slider_running_total += size * education_salary_base_by_pop_type.at (pop_type).get_untracked ();
13991400 projected_military_spending_unscaled_by_slider_running_total += size * military_salary_base_by_pop_type.at (pop_type).get_untracked ();
14001401 projected_pensions_spending_unscaled_by_slider_running_total += size * calculate_pensions_base (pop_type);
1401- projected_unemployment_subsidies_spending_unscaled_by_slider_running_total += get_unemployed_pops_by_type (pop_type)
1402+ projected_unemployment_subsidies_spending_unscaled_by_slider_running_total += type_safe::get ( get_unemployed_pops_by_type (pop_type) )
14021403 * calculate_unemployment_subsidies_base (pop_type);
14031404 }
14041405
0 commit comments