aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/ProvinceInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/map/ProvinceInstance.cpp')
-rw-r--r--src/openvic-simulation/map/ProvinceInstance.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/openvic-simulation/map/ProvinceInstance.cpp b/src/openvic-simulation/map/ProvinceInstance.cpp
index 967d72b..61b1527 100644
--- a/src/openvic-simulation/map/ProvinceInstance.cpp
+++ b/src/openvic-simulation/map/ProvinceInstance.cpp
@@ -39,8 +39,8 @@ bool ProvinceInstance::expand_building(size_t building_index) {
return building->expand();
}
-void ProvinceInstance::_add_pop(Pop pop) {
- pop.set_location(this);
+void ProvinceInstance::_add_pop(Pop&& pop) {
+ pop.set_location(*this);
pops.push_back(std::move(pop));
}
@@ -54,11 +54,11 @@ bool ProvinceInstance::add_pop(Pop&& pop) {
}
}
-bool ProvinceInstance::add_pop_vec(std::vector<Pop> const& pop_vec) {
+bool ProvinceInstance::add_pop_vec(std::vector<PopBase> const& pop_vec) {
if (!province_definition.is_water()) {
reserve_more(pops, pop_vec.size());
- for (Pop const& pop : pop_vec) {
- _add_pop(pop);
+ for (PopBase const& pop : pop_vec) {
+ _add_pop(Pop { pop });
}
return true;
} else {