diff options
Diffstat (limited to 'src/openvic-simulation/misc')
-rw-r--r-- | src/openvic-simulation/misc/Define.cpp | 4 | ||||
-rw-r--r-- | src/openvic-simulation/misc/Define.hpp | 10 |
2 files changed, 7 insertions, 7 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..be71f9d 100644 --- a/src/openvic-simulation/misc/Define.hpp +++ b/src/openvic-simulation/misc/Define.hpp @@ -15,8 +15,8 @@ namespace OpenVic { enum class Type : unsigned char { None, Country, Economy, Military, Diplomacy, Pops, Ai, Graphics }; private: - std::string HASID_PROPERTY(value); - Type HASID_PROPERTY(type); + const std::string PROPERTY(value); + const Type PROPERTY(type); Define(std::string_view new_identifier, std::string&& new_value, Type new_type); @@ -40,10 +40,10 @@ namespace OpenVic { bool add_define(std::string_view name, std::string&& value, Define::Type type); bool add_date_define(std::string_view name, Date date); - IDENTIFIER_REGISTRY_ACCESSORS(define); + 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); }; |