aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/misc
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/misc
parent8a00697a0e6a4168894594eadc373836a1689eea (diff)
Stop passing Dates by reference
Diffstat (limited to 'src/openvic-simulation/misc')
-rw-r--r--src/openvic-simulation/misc/Define.cpp4
-rw-r--r--src/openvic-simulation/misc/Define.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/misc/Define.cpp b/src/openvic-simulation/misc/Define.cpp
index 5e6a3cb..c866b5d 100644
--- a/src/openvic-simulation/misc/Define.cpp
+++ b/src/openvic-simulation/misc/Define.cpp
@@ -36,11 +36,11 @@ bool DefineManager::add_define(std::string_view name, std::string&& value, Defin
return defines.add_item({ name, std::move(value), type }, duplicate_warning_callback);
}
-const Date& DefineManager::get_start_date() const {
+Date DefineManager::get_start_date() const {
return *start_date;
}
-const Date& DefineManager::get_end_date() const {
+Date DefineManager::get_end_date() const {
return *end_date;
}
diff --git a/src/openvic-simulation/misc/Define.hpp b/src/openvic-simulation/misc/Define.hpp
index 0db9716..56ce0b0 100644
--- a/src/openvic-simulation/misc/Define.hpp
+++ b/src/openvic-simulation/misc/Define.hpp
@@ -42,8 +42,8 @@ namespace OpenVic {
bool add_date_define(std::string_view name, Date date);
IDENTIFIER_REGISTRY_ACCESSORS(define);
- const Date& get_start_date() const;
- const Date& get_end_date() const;
+ Date get_start_date() const;
+ Date get_end_date() const;
bool load_defines_file(ast::NodeCPtr root);
};