From ad17b83930d83c3bbe5d58cf30c54fe88ac5d927 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Wed, 20 Sep 2023 14:03:25 +0200 Subject: feat: merged PartyIssue and PoliticalReform into single Issue structure --- src/openvic-simulation/politics/PartyIssue.cpp | 33 -------------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/openvic-simulation/politics/PartyIssue.cpp (limited to 'src/openvic-simulation/politics/PartyIssue.cpp') diff --git a/src/openvic-simulation/politics/PartyIssue.cpp b/src/openvic-simulation/politics/PartyIssue.cpp deleted file mode 100644 index 04e0f2f..0000000 --- a/src/openvic-simulation/politics/PartyIssue.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "PartyIssue.hpp" - -using namespace OpenVic; - -PartyIssueGroup::PartyIssueGroup(const std::string_view new_identifier) : HasIdentifier { new_identifier } {} - -PartyIssue::PartyIssue(const std::string_view new_identifier, PartyIssueGroup const& new_group) - : HasIdentifier { new_identifier }, group { new_group } {} - -PartyIssueManager::PartyIssueManager() : party_issue_groups { "party issue groups" }, party_issues { "party issues" } {} - -bool PartyIssueManager::add_party_issue_group(const std::string_view identifier) { - if (identifier.empty()) { - Logger::error("Invalid party issue group identifier - empty!"); - return false; - } - - return party_issue_groups.add_item({ identifier }); -} - -bool PartyIssueManager::add_party_issue(const std::string_view identifier, PartyIssueGroup const* group) { - if (identifier.empty()) { - Logger::error("Invalid party issue identifier - empty!"); - return false; - } - - if (group == nullptr) { - Logger::error("Null party issue group for ", identifier); - return false; - } - - return party_issues.add_item({ identifier, *group }); -} \ No newline at end of file -- cgit v1.2.3-56-ga3b1