diff options
author | Nemrav <> | 2024-09-17 18:44:23 +0200 |
---|---|---|
committer | Nemrav <> | 2024-09-17 18:44:23 +0200 |
commit | c232250cc9819ae8bf165a5707a926db928dcb2b (patch) | |
tree | 1067808ef3d362ddae62b8d5994138434c5b7178 /src/openvic-simulation/history/ProvinceHistory.cpp | |
parent | f090f8f33a41d8707795c8963fa67073ba90f554 (diff) | |
parent | d8c04cbe53188d4717f8c49f918e01657dbf3440 (diff) |
Merge branch 'master' into gfxobject
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; |