@@ -183,7 +183,7 @@ CountryInstance::CountryInstance(
183183 }},
184184 research_progress{[this ](DependencyTracker& tracker)->fixed_point_t {
185185 const fixed_point_t current_research_cost_copy = current_research_cost.get (tracker);
186- return current_research_cost_copy > fixed_point_t ::_0
186+ return current_research_cost_copy > 0
187187 ? invested_research_points.get (tracker) / current_research_cost_copy
188188 : fixed_point_t ::_0;
189189 }},
@@ -1296,7 +1296,7 @@ void CountryInstance::_update_production() {
12961296}
12971297
12981298static inline constexpr fixed_point_t nonzero_or_one (fixed_point_t const & value) {
1299- return value == fixed_point_t ::_0 ? fixed_point_t ::_1 : value;
1299+ return value == 0 ? fixed_point_t ::_1 : value;
13001300}
13011301
13021302void CountryInstance::_update_budget () {
@@ -1443,7 +1443,7 @@ void CountryInstance::_update_current_tech(const Date today) {
14431443 );
14441444
14451445 const fixed_point_t daily_research_points_copy = daily_research_points.get_untracked ();
1446- if (daily_research_points_copy > fixed_point_t ::_0 ) {
1446+ if (daily_research_points_copy > 0 ) {
14471447 expected_research_completion_date.set (
14481448 today
14491449 + static_cast <Timespan>(
@@ -1459,7 +1459,7 @@ void CountryInstance::_update_current_tech(const Date today) {
14591459}
14601460
14611461void CountryInstance::_update_technology (const Date today) {
1462- if (research_point_stockpile.get_untracked () < fixed_point_t ::_0 ) {
1462+ if (research_point_stockpile.get_untracked () < 0 ) {
14631463 research_point_stockpile.set (0 );
14641464 }
14651465
@@ -1468,7 +1468,7 @@ void CountryInstance::_update_technology(const Date today) {
14681468 get_modifier_effect_value (*modifier_effect_cache.get_research_points_modifier ()) +
14691469 get_modifier_effect_value (*modifier_effect_cache.get_increase_research ());
14701470
1471- if (daily_research_points.get_untracked () < fixed_point_t ::_0 ) {
1471+ if (daily_research_points.get_untracked () < 0 ) {
14721472 daily_research_points.set (0 );
14731473 }
14741474
@@ -1494,18 +1494,18 @@ void CountryInstance::_update_population() {
14941494 leadership_points_from_pop_types.clear ();
14951495
14961496 for (auto const & [pop_type, pop_size] : get_population_by_type ()) {
1497- if (pop_type.get_research_leadership_optimum () > fixed_point_t ::_0 && pop_size > 0 ) {
1497+ if (pop_type.get_research_leadership_optimum () > 0 && pop_size > 0 ) {
14981498 const fixed_point_t factor = std::min (
14991499 pop_size / (get_total_population () * pop_type.get_research_leadership_optimum ()), fixed_point_t ::_1
15001500 );
15011501
1502- if (pop_type.get_research_points () != fixed_point_t ::_0 ) {
1502+ if (pop_type.get_research_points () != 0 ) {
15031503 const fixed_point_t research_points = pop_type.get_research_points () * factor;
15041504 research_points_from_pop_types[&pop_type] = research_points;
15051505 daily_research_points += research_points;
15061506 }
15071507
1508- if (pop_type.get_leadership_points () != fixed_point_t ::_0 ) {
1508+ if (pop_type.get_leadership_points () != 0 ) {
15091509 const fixed_point_t leadership_points = pop_type.get_leadership_points () * factor;
15101510 leadership_points_from_pop_types[&pop_type] = leadership_points;
15111511 monthly_leadership_points = leadership_points;
@@ -1638,7 +1638,7 @@ void CountryInstance::_update_military() {
16381638 monthly_leadership_points *= fixed_point_t ::_1 +
16391639 get_modifier_effect_value (*modifier_effect_cache.get_leadership_modifier ());
16401640
1641- if (monthly_leadership_points < fixed_point_t ::_0 ) {
1641+ if (monthly_leadership_points < 0 ) {
16421642 monthly_leadership_points = 0 ;
16431643 }
16441644
@@ -1796,7 +1796,7 @@ void CountryInstance::update_gamestate(const Date today, MapInstance& map_instan
17961796 }
17971797 }
17981798
1799- if (owned_cores_controlled_proportion != fixed_point_t ::_0 ) {
1799+ if (owned_cores_controlled_proportion != 0 ) {
18001800 owned_cores_controlled_proportion /= owned_core_province_count;
18011801 }
18021802 }
@@ -1832,7 +1832,7 @@ void CountryInstance::update_gamestate(const Date today, MapInstance& map_instan
18321832 }
18331833 }
18341834
1835- if (occupied_provinces_proportion != fixed_point_t ::_0 ) {
1835+ if (occupied_provinces_proportion != 0 ) {
18361836 occupied_provinces_proportion /= owned_provinces.size ();
18371837 }
18381838
@@ -2343,49 +2343,49 @@ void CountryInstance::request_salaries_and_welfare_and_import_subsidies(Pop& pop
23432343 const pop_size_t pop_size = pop.get_size ();
23442344 SharedPopTypeValues const & pop_type_values = shared_country_values.get_shared_pop_type_values (pop_type);
23452345
2346- if (actual_administration_budget > fixed_point_t ::_0 ) {
2346+ if (actual_administration_budget > 0 ) {
23472347 const fixed_point_t administration_salary = fixed_point_t::mul_div (
23482348 pop_size * administration_salary_base_by_pop_type.at (pop_type).get_untracked (),
23492349 actual_administration_budget,
23502350 projected_administration_spending_unscaled_by_slider.get_untracked ()
23512351 ) / Pop::size_denominator;
2352- if (administration_salary > fixed_point_t ::_0 ) {
2352+ if (administration_salary > 0 ) {
23532353 pop.add_government_salary_administration (administration_salary);
23542354 actual_administration_spending += administration_salary;
23552355 }
23562356 }
23572357
2358- if (actual_education_budget > fixed_point_t ::_0 ) {
2358+ if (actual_education_budget > 0 ) {
23592359 const fixed_point_t education_salary = fixed_point_t::mul_div (
23602360 pop_size * education_salary_base_by_pop_type.at (pop_type).get_untracked (),
23612361 actual_education_budget,
23622362 projected_education_spending_unscaled_by_slider.get_untracked ()
23632363 ) / Pop::size_denominator;
2364- if (education_salary > fixed_point_t ::_0 ) {
2364+ if (education_salary > 0 ) {
23652365 pop.add_government_salary_education (education_salary);
23662366 actual_education_spending += education_salary;
23672367 }
23682368 }
23692369
2370- if (actual_military_budget > fixed_point_t ::_0 ) {
2370+ if (actual_military_budget > 0 ) {
23712371 const fixed_point_t military_salary = fixed_point_t::mul_div (
23722372 pop_size * military_salary_base_by_pop_type.at (pop_type).get_untracked (),
23732373 actual_military_budget,
23742374 projected_military_spending_unscaled_by_slider.get_untracked ()
23752375 ) / Pop::size_denominator;
2376- if (military_salary > fixed_point_t ::_0 ) {
2376+ if (military_salary > 0 ) {
23772377 pop.add_government_salary_military (military_salary);
23782378 actual_military_spending += military_salary;
23792379 }
23802380 }
23812381
2382- if (actual_social_budget > fixed_point_t ::_0 ) {
2382+ if (actual_social_budget > 0 ) {
23832383 const fixed_point_t pension_income = fixed_point_t::mul_div (
23842384 pop_size * calculate_pensions_base (pop_type),
23852385 actual_social_budget,
23862386 projected_social_spending_unscaled_by_slider.get_untracked ()
23872387 ) / Pop::size_denominator;
2388- if (pension_income > fixed_point_t ::_0 ) {
2388+ if (pension_income > 0 ) {
23892389 pop.add_pensions (pension_income);
23902390 actual_pensions_spending += pension_income;
23912391 }
@@ -2395,13 +2395,13 @@ void CountryInstance::request_salaries_and_welfare_and_import_subsidies(Pop& pop
23952395 actual_social_budget,
23962396 projected_social_spending_unscaled_by_slider.get_untracked ()
23972397 ) / Pop::size_denominator;
2398- if (unemployment_subsidies > fixed_point_t ::_0 ) {
2398+ if (unemployment_subsidies > 0 ) {
23992399 pop.add_unemployment_subsidies (unemployment_subsidies);
24002400 actual_unemployment_subsidies_spending += unemployment_subsidies;
24012401 }
24022402 }
24032403
2404- if (actual_import_subsidies_budget > fixed_point_t ::_0 ) {
2404+ if (actual_import_subsidies_budget > 0 ) {
24052405 const fixed_point_t import_subsidies = fixed_point_t::mul_div (
24062406 effective_tariff_rate.get_untracked () // < 0
24072407 * pop.get_yesterdays_import_value ().get_copy_of_value (),
0 commit comments