aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/country
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-06-13 00:52:45 +0200
committer GitHub <noreply@github.com>2024-06-13 00:52:45 +0200
commita49e4d0975e2b5dfd13ae50aa716f1a0307e618d (patch)
treef681dd2e76d489ba6e7beea44ae6ebd59e9d51f3 /src/openvic-simulation/country
parentf5d173e88a49a1a9556860063aef1aa287925cfd (diff)
parent1198a780916e65cae048dd3478f614c1d18db846 (diff)
Merge pull request #162 from OpenVicProject/map-instance
Map instance
Diffstat (limited to 'src/openvic-simulation/country')
-rw-r--r--src/openvic-simulation/country/CountryInstance.cpp7
-rw-r--r--src/openvic-simulation/country/CountryInstance.hpp5
2 files changed, 8 insertions, 4 deletions
diff --git a/src/openvic-simulation/country/CountryInstance.cpp b/src/openvic-simulation/country/CountryInstance.cpp
index 58e5232..25f40ed 100644
--- a/src/openvic-simulation/country/CountryInstance.cpp
+++ b/src/openvic-simulation/country/CountryInstance.cpp
@@ -109,7 +109,8 @@ bool CountryInstanceManager::generate_country_instances(CountryManager const& co
}
bool CountryInstanceManager::apply_history_to_countries(
- CountryHistoryManager const& history_manager, Date date, UnitInstanceManager& unit_instance_manager, Map& map
+ CountryHistoryManager const& history_manager, Date date, UnitInstanceManager& unit_instance_manager,
+ MapInstance& map_instance
) {
bool ret = true;
@@ -129,7 +130,9 @@ bool CountryInstanceManager::apply_history_to_countries(
}
if (oob_history_entry != nullptr) {
- unit_instance_manager.generate_deployment(map, country_instance, *oob_history_entry->get_inital_oob());
+ unit_instance_manager.generate_deployment(
+ map_instance, country_instance, *oob_history_entry->get_inital_oob()
+ );
}
}
}
diff --git a/src/openvic-simulation/country/CountryInstance.hpp b/src/openvic-simulation/country/CountryInstance.hpp
index 33cee61..68d2bb2 100644
--- a/src/openvic-simulation/country/CountryInstance.hpp
+++ b/src/openvic-simulation/country/CountryInstance.hpp
@@ -59,7 +59,7 @@ namespace OpenVic {
struct CountryManager;
struct CountryHistoryManager;
struct UnitInstanceManager;
- struct Map;
+ struct MapInstance;
struct CountryInstanceManager {
private:
@@ -69,7 +69,8 @@ namespace OpenVic {
bool generate_country_instances(CountryManager const& country_manager);
bool apply_history_to_countries(
- CountryHistoryManager const& history_manager, Date date, UnitInstanceManager& unit_instance_manager, Map& map
+ CountryHistoryManager const& history_manager, Date date, UnitInstanceManager& unit_instance_manager,
+ MapInstance& map_instance
);
};
}