aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Province.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-11-04 19:44:38 +0100
committer hop311 <hop3114@gmail.com>2023-11-07 19:34:51 +0100
commitb5bbeb47febc823517a5baba4eca66f32fb3609c (patch)
tree1a78d296f22d1cd17a84ce824974f9438a197074 /src/openvic-simulation/map/Province.cpp
parentc1b7cab254ac14a173477661047ad2492930ff8b (diff)
Cross-platform file lookup (case and separator)
Diffstat (limited to 'src/openvic-simulation/map/Province.cpp')
-rw-r--r--src/openvic-simulation/map/Province.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/openvic-simulation/map/Province.cpp b/src/openvic-simulation/map/Province.cpp
index 66e4daf..77bf33f 100644
--- a/src/openvic-simulation/map/Province.cpp
+++ b/src/openvic-simulation/map/Province.cpp
@@ -131,31 +131,21 @@ Pop::pop_size_t Province::get_total_population() const {
return total_population;
}
-distribution_t const& Province::get_pop_type_distribution() const {
- return pop_types;
-}
-
-distribution_t const& Province::get_culture_distribution() const {
- return cultures;
-}
-
-distribution_t const& Province::get_religion_distribution() const {
- return religions;
-}
-
/* REQUIREMENTS:
* MAP-65, MAP-68, MAP-70, MAP-234
*/
void Province::update_pops() {
total_population = 0;
- pop_types.clear();
- cultures.clear();
- religions.clear();
+ pop_type_distribution.clear();
+ ideology_distribution.clear();
+ culture_distribution.clear();
+ religion_distribution.clear();
for (Pop const& pop : pops) {
total_population += pop.get_size();
- pop_types[&pop.get_type()] += pop.get_size();
- cultures[&pop.get_culture()] += pop.get_size();
- religions[&pop.get_religion()] += pop.get_size();
+ pop_type_distribution[&pop.get_type()] += pop.get_size();
+ //ideology_distribution[&pop.get_???()] += pop.get_size();
+ culture_distribution[&pop.get_culture()] += pop.get_size();
+ religion_distribution[&pop.get_religion()] += pop.get_size();
}
}