aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/map/Province.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic/map/Province.cpp')
-rw-r--r--src/openvic/map/Province.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/openvic/map/Province.cpp b/src/openvic/map/Province.cpp
index 3de7263..76e478f 100644
--- a/src/openvic/map/Province.cpp
+++ b/src/openvic/map/Province.cpp
@@ -65,11 +65,13 @@ std::string Province::to_string() const {
return stream.str();
}
-void Province::add_pop(Pop&& pop) {
- if (is_water()) {
- Logger::error("Trying to add pop to water province ", get_identifier());
- } else {
+return_t Province::add_pop(Pop&& pop) {
+ if (!is_water()) {
pops.push_back(std::move(pop));
+ return SUCCESS;
+ } else {
+ Logger::error("Trying to add pop to water province ", get_identifier());
+ return FAILURE;
}
}