aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/misc/Define.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-11-17 10:19:53 +0100
committer GitHub <noreply@github.com>2023-11-17 10:19:53 +0100
commite76336cd92639f4ec71088fc4c80aea4c25528cd (patch)
treeeeed419a7d97ecb58adf63a17eb9184db3e5ed7a /src/openvic-simulation/misc/Define.hpp
parenta00b558a53edb40c9e6789790036f0b618e80ec1 (diff)
parent886b8b8f396438fc2b7da7d2508f2064d14150a8 (diff)
Merge pull request #75 from OpenVicProject/accumulated-changes
Accumulated changes
Diffstat (limited to 'src/openvic-simulation/misc/Define.hpp')
-rw-r--r--src/openvic-simulation/misc/Define.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/openvic-simulation/misc/Define.hpp b/src/openvic-simulation/misc/Define.hpp
index be71f9d..46e4836 100644
--- a/src/openvic-simulation/misc/Define.hpp
+++ b/src/openvic-simulation/misc/Define.hpp
@@ -1,7 +1,7 @@
#pragma once
#include <concepts>
-#include <memory>
+#include <optional>
#include "openvic-simulation/types/IdentifierRegistry.hpp"
#include "openvic-simulation/types/fixed_point/FixedPoint.hpp"
@@ -32,8 +32,8 @@ namespace OpenVic {
private:
IdentifierRegistry<Define> defines;
- std::unique_ptr<Date> start_date = nullptr;
- std::unique_ptr<Date> end_date = nullptr;
+ std::optional<Date> start_date;
+ std::optional<Date> end_date;
public:
DefineManager();
@@ -44,6 +44,7 @@ namespace OpenVic {
Date get_start_date() const;
Date get_end_date() const;
+ bool in_game_period(Date date) const;
bool load_defines_file(ast::NodeCPtr root);
};