diff options
Diffstat (limited to 'src/openvic-simulation/pop')
-rw-r--r-- | src/openvic-simulation/pop/Culture.cpp | 4 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Pop.cpp | 16 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Pop.hpp | 6 |
3 files changed, 3 insertions, 23 deletions
diff --git a/src/openvic-simulation/pop/Culture.cpp b/src/openvic-simulation/pop/Culture.cpp index bbfa35a..8a0ca37 100644 --- a/src/openvic-simulation/pop/Culture.cpp +++ b/src/openvic-simulation/pop/Culture.cpp @@ -1,7 +1,5 @@ #include "Culture.hpp" -#include <set> - #include "openvic-simulation/dataloader/NodeTools.hpp" using namespace OpenVic; @@ -193,7 +191,7 @@ bool CultureManager::load_culture_file(ast::NodeCPtr root) { CultureGroup const* culture_group = get_culture_group_by_identifier(culture_group_key); return expect_dictionary( [this, culture_group](std::string_view key, ast::NodeCPtr value) -> bool { - static const std::set<std::string, std::less<void>> reserved_keys = { + static const string_set_t reserved_keys = { "leader", "unit", "union", "is_overseas" }; if (reserved_keys.find(key) != reserved_keys.end()) return true; diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp index dc53201..5b1ce02 100644 --- a/src/openvic-simulation/pop/Pop.cpp +++ b/src/openvic-simulation/pop/Pop.cpp @@ -123,22 +123,6 @@ bool PopType::get_is_slave() const { PopManager::PopManager() : pop_types { "pop types" } {} -CultureManager& PopManager::get_culture_manager() { - return culture_manager; -} - -CultureManager const& PopManager::get_culture_manager() const { - return culture_manager; -} - -ReligionManager& PopManager::get_religion_manager() { - return religion_manager; -} - -ReligionManager const& PopManager::get_religion_manager() const { - return religion_manager; -} - bool PopManager::add_pop_type(std::string_view identifier, colour_t colour, PopType::strata_t strata, PopType::sprite_t sprite, Good::good_map_t&& life_needs, Good::good_map_t&& everyday_needs, Good::good_map_t&& luxury_needs, PopType::rebel_units_t&& rebel_units, Pop::pop_size_t max_size, diff --git a/src/openvic-simulation/pop/Pop.hpp b/src/openvic-simulation/pop/Pop.hpp index 26f89db..7261831 100644 --- a/src/openvic-simulation/pop/Pop.hpp +++ b/src/openvic-simulation/pop/Pop.hpp @@ -99,10 +99,8 @@ namespace OpenVic { public: PopManager(); - CultureManager& get_culture_manager(); - CultureManager const& get_culture_manager() const; - ReligionManager& get_religion_manager(); - ReligionManager const& get_religion_manager() const; + REF_GETTERS(culture_manager) + REF_GETTERS(religion_manager) bool add_pop_type(std::string_view identifier, colour_t new_colour, PopType::strata_t strata, PopType::sprite_t sprite, Good::good_map_t&& life_needs, Good::good_map_t&& everyday_needs, Good::good_map_t&& luxury_needs, |