aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop/Pop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/pop/Pop.cpp')
-rw-r--r--src/openvic-simulation/pop/Pop.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp
index 0ecd937..c421de3 100644
--- a/src/openvic-simulation/pop/Pop.cpp
+++ b/src/openvic-simulation/pop/Pop.cpp
@@ -1,6 +1,7 @@
#include "Pop.hpp"
#include "openvic-simulation/country/CountryDefinition.hpp"
+#include "openvic-simulation/country/CountryInstance.hpp"
#include "openvic-simulation/map/ProvinceInstance.hpp"
#include "openvic-simulation/military/UnitType.hpp"
#include "openvic-simulation/politics/Ideology.hpp"
@@ -119,7 +120,9 @@ void Pop::set_location(ProvinceInstance const& new_location) {
// TODO - update location dependent attributes
- votes.set_keys(location->get_owner() != nullptr ? &location->get_owner()->get_parties() : nullptr);
+ votes.set_keys(
+ location->get_owner() != nullptr ? &location->get_owner()->get_country_definition()->get_parties() : nullptr
+ );
// TODO - calculate vote distribution
}
}