aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/Date.cpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-05-16 23:31:52 +0200
committer Hop311 <hop3114@gmail.com>2023-05-16 23:31:52 +0200
commitfa7e8d2af880989ba17aa89f7a9cb0905aff5e23 (patch)
treee26df8e53b37b70f7b88a55770c776d32f71fab4 /src/openvic/Date.cpp
parentcedac2d020ae7e54d8fc5c21e390a306050bc220 (diff)
Fixed Date ostream << operator
Diffstat (limited to 'src/openvic/Date.cpp')
-rw-r--r--src/openvic/Date.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvic/Date.cpp b/src/openvic/Date.cpp
index 003a455..d25e99f 100644
--- a/src/openvic/Date.cpp
+++ b/src/openvic/Date.cpp
@@ -57,7 +57,7 @@ Timespan::operator std::string() const {
return std::to_string(days);
}
-std::ostream& operator<<(std::ostream& out, Timespan timespan) {
+std::ostream& OpenVic::operator<<(std::ostream& out, Timespan const& timespan) {
return out << static_cast<std::string>(timespan);
}
@@ -128,7 +128,7 @@ Date::operator std::string() const {
return ss.str();
}
-std::ostream& operator<<(std::ostream& out, Date date) {
+std::ostream& OpenVic::operator<<(std::ostream& out, Date const& date) {
return out << (int) date.getYear() << '.' << (int) date.getMonth() << '.' << (int) date.getDay();
}