aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/ProvinceHistory.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-10-30 00:06:10 +0100
committer hop311 <hop3114@gmail.com>2023-11-07 19:33:33 +0100
commite91ce707b2c0e80591b9fd1b6a5215e6e6989df8 (patch)
tree3740e9feb3bfa91b8b02362ed11d1e9f7e67e7c9 /src/openvic-simulation/history/ProvinceHistory.cpp
parent8a00697a0e6a4168894594eadc373836a1689eea (diff)
Stop passing Dates by reference
Diffstat (limited to 'src/openvic-simulation/history/ProvinceHistory.cpp')
-rw-r--r--src/openvic-simulation/history/ProvinceHistory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/history/ProvinceHistory.cpp b/src/openvic-simulation/history/ProvinceHistory.cpp
index c2d5451..6dbf6a4 100644
--- a/src/openvic-simulation/history/ProvinceHistory.cpp
+++ b/src/openvic-simulation/history/ProvinceHistory.cpp
@@ -176,7 +176,7 @@ inline ProvinceHistory const* ProvinceHistoryManager::get_province_history(
}
inline bool ProvinceHistoryManager::_load_province_history_entry(
- GameManager& game_manager, std::string_view province, Date const& date, ast::NodeCPtr root
+ GameManager& game_manager, std::string_view province, Date date, ast::NodeCPtr root
) {
Country const* owner = nullptr;
Country const* controller = nullptr;
@@ -207,7 +207,7 @@ inline bool ProvinceHistoryManager::_load_province_history_entry(
}
bool is_date;
- Date().from_string(key, &is_date, true);
+ Date::from_string(key, &is_date, true);
if (is_date) {
return true;
}
@@ -307,12 +307,12 @@ bool ProvinceHistoryManager::load_province_history_file(GameManager& game_manage
ret &= expect_dictionary(
[this, &game_manager, &name](std::string_view key, ast::NodeCPtr value) -> bool {
bool is_date = false;
- Date entry = Date().from_string(key, &is_date, true);
+ Date entry = Date::from_string(key, &is_date, true);
if (!is_date) {
return true;
}
- Date const& end_date = game_manager.get_define_manager().get_end_date();
+ Date end_date = game_manager.get_define_manager().get_end_date();
if (entry > end_date) {
Logger::error(
"History entry ", entry.to_string(), " of province ", name, " defined after defined end date ",