aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Map.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-12-28 17:43:43 +0100
committer GitHub <noreply@github.com>2023-12-28 17:43:43 +0100
commit0a425fbe05d6138b753c0e4a7c06f06695bde8af (patch)
tree8f67577b0101c06e2a7cc4d4c277d686d16d3d75 /src/openvic-simulation/map/Map.cpp
parent56a865d7d0868b785eb6b9b723f0e52f65e6457d (diff)
parent12a47833bbe72d50271bde15c7579c1e801863c2 (diff)
Merge pull request #110 from OpenVicProject/clock-refactor
Clock refactor + misc small fixes
Diffstat (limited to 'src/openvic-simulation/map/Map.cpp')
-rw-r--r--src/openvic-simulation/map/Map.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/openvic-simulation/map/Map.cpp b/src/openvic-simulation/map/Map.cpp
index 67e91cd..39d4870 100644
--- a/src/openvic-simulation/map/Map.cpp
+++ b/src/openvic-simulation/map/Map.cpp
@@ -286,9 +286,9 @@ bool Map::apply_history_to_provinces(ProvinceHistoryManager const& history_manag
return ret;
}
-void Map::update_state(Date today) {
+void Map::update_gamestate(Date today) {
for (Province& province : provinces.get_items()) {
- province.update_state(today);
+ province.update_gamestate(today);
}
update_highest_province_population();
update_total_map_population();
@@ -684,11 +684,14 @@ bool Map::load_climate_file(ModifierManager const& modifier_manager, ast::NodeCP
return true;
}
))(node);
- cur_climate->lock();
}
return ret;
})(root);
+ for (Climate& climate : climates.get_items()) {
+ climate.lock();
+ }
+
lock_climates();
return ret;