aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/CountryHistory.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-09-07 00:07:27 +0200
committer hop311 <hop3114@gmail.com>2024-09-08 18:24:57 +0200
commit16349d6cad05497f983b1da123b6284ecfddd638 (patch)
treeb22020c1221adc6633599a1ad53bf73bb62db0ad /src/openvic-simulation/history/CountryHistory.cpp
parentb5407c8794c4626d010bd0856a146095daa1042d (diff)
Calculate country industrial power (states still need factory data)
Diffstat (limited to 'src/openvic-simulation/history/CountryHistory.cpp')
-rw-r--r--src/openvic-simulation/history/CountryHistory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openvic-simulation/history/CountryHistory.cpp b/src/openvic-simulation/history/CountryHistory.cpp
index 145d26b..04f6292 100644
--- a/src/openvic-simulation/history/CountryHistory.cpp
+++ b/src/openvic-simulation/history/CountryHistory.cpp
@@ -191,6 +191,10 @@ void CountryHistoryManager::reserve_more_country_histories(size_t size) {
}
void CountryHistoryManager::lock_country_histories() {
+ for (auto [country, history_map] : mutable_iterator(country_histories)) {
+ history_map.sort_entries();
+ }
+
Logger::info("Locked country history registry after registering ", country_histories.size(), " items");
locked = true;
}