From b7b94da345d66f839164ec25450576525474b357 Mon Sep 17 00:00:00 2001 From: hop311 Date: Sat, 19 Oct 2024 12:58:20 +0100 Subject: Test that modifier calculation methods produce the same results --- src/openvic-simulation/map/ProvinceInstance.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (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 e7c0326..2794a50 100644 --- a/src/openvic-simulation/map/ProvinceInstance.hpp +++ b/src/openvic-simulation/map/ProvinceInstance.hpp @@ -11,6 +11,8 @@ #include "openvic-simulation/types/HasIdentifier.hpp" #include "openvic-simulation/types/OrderedContainers.hpp" +#include "openvic-simulation/ModifierCalculationTestToggle.hpp" + namespace OpenVic { struct MapInstance; struct ProvinceDefinition; @@ -70,10 +72,14 @@ namespace OpenVic { CountryInstance* PROPERTY(controller); ordered_set PROPERTY(cores); +#if OV_MODIFIER_CALCULATION_TEST + const bool ADD_OWNER_CONTRIBUTION; +#else public: static constexpr bool ADD_OWNER_CONTRIBUTION = true; private: +#endif // The total/resultant modifier affecting this province, including owner country contributions if // ADD_OWNER_CONTRIBUTION is true. ModifierSum PROPERTY(modifier_sum); @@ -102,6 +108,9 @@ namespace OpenVic { size_t PROPERTY(max_supported_regiments); ProvinceInstance( +#if OV_MODIFIER_CALCULATION_TEST + bool new_ADD_OWNER_CONTRIBUTION, +#endif ProvinceDefinition const& new_province_definition, decltype(pop_type_distribution)::keys_t const& pop_type_keys, decltype(ideology_distribution)::keys_t const& ideology_keys ); -- cgit v1.2.3-56-ga3b1