diff options
author | hop311 <hop3114@gmail.com> | 2023-11-14 22:42:00 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-11-15 21:06:20 +0100 |
commit | 8271b1519e095ee3e7245cde2f0b54561c3ec619 (patch) | |
tree | 0168ea3d3125f68b700d53e3fa0ebdd80b337653 /src/openvic-simulation/misc/Define.hpp | |
parent | e031758cf68535e97045c07f36e2524676447778 (diff) |
Bookmark loading + province and building cleanup
Diffstat (limited to 'src/openvic-simulation/misc/Define.hpp')
-rw-r--r-- | src/openvic-simulation/misc/Define.hpp | 7 |
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); }; |