diff options
author | hop311 <hop3114@gmail.com> | 2024-09-07 00:07:27 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-09-08 18:24:57 +0200 |
commit | 16349d6cad05497f983b1da123b6284ecfddd638 (patch) | |
tree | b22020c1221adc6633599a1ad53bf73bb62db0ad /src/openvic-simulation/history/ProvinceHistory.cpp | |
parent | b5407c8794c4626d010bd0856a146095daa1042d (diff) |
Calculate country industrial power (states still need factory data)
Diffstat (limited to 'src/openvic-simulation/history/ProvinceHistory.cpp')
-rw-r--r-- | src/openvic-simulation/history/ProvinceHistory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openvic-simulation/history/ProvinceHistory.cpp b/src/openvic-simulation/history/ProvinceHistory.cpp index ca0bf4e..ef8793b 100644 --- a/src/openvic-simulation/history/ProvinceHistory.cpp +++ b/src/openvic-simulation/history/ProvinceHistory.cpp @@ -157,8 +157,10 @@ void ProvinceHistoryManager::lock_province_histories(MapDefinition const& map_de std::vector<ProvinceDefinition> const& provinces = map_definition.get_province_definitions(); std::vector<bool> province_checklist(provinces.size()); - for (decltype(province_histories)::value_type const& entry : province_histories) { - province_checklist[entry.first->get_index() - 1] = true; + for (auto [province, history_map] : mutable_iterator(province_histories)) { + province_checklist[province->get_index() - 1] = true; + + history_map.sort_entries(); } size_t missing = 0; |