aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/politics
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/politics')
-rw-r--r--src/openvic-simulation/politics/Government.cpp2
-rw-r--r--src/openvic-simulation/politics/Ideology.cpp4
-rw-r--r--src/openvic-simulation/politics/Ideology.hpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/politics/Government.cpp b/src/openvic-simulation/politics/Government.cpp
index 823284a..3b0f28d 100644
--- a/src/openvic-simulation/politics/Government.cpp
+++ b/src/openvic-simulation/politics/Government.cpp
@@ -85,7 +85,7 @@ bool GovernmentTypeManager::load_government_types_file(IdeologyManager const& id
[this, &ideology_manager, &ideologies, government_type_identifier](
std::string_view key, ast::NodeCPtr value) -> bool {
static const string_set_t reserved_keys = { "election", "duration", "appoint_ruling_party", "flagType" };
- if (reserved_keys.find(key) != reserved_keys.end()) {
+ if (reserved_keys.contains(key)) {
return true;
}
Ideology const* ideology = ideology_manager.get_ideology_by_identifier(key);
diff --git a/src/openvic-simulation/politics/Ideology.cpp b/src/openvic-simulation/politics/Ideology.cpp
index acbd82f..148d6ac 100644
--- a/src/openvic-simulation/politics/Ideology.cpp
+++ b/src/openvic-simulation/politics/Ideology.cpp
@@ -8,7 +8,7 @@ IdeologyGroup::IdeologyGroup(std::string_view new_identifier) : HasIdentifier {
Ideology::Ideology(
std::string_view new_identifier, colour_t new_colour, IdeologyGroup const& new_group, bool new_uncivilised,
bool new_can_reduce_militancy, Date new_spawn_date
-) : HasIdentifierAndColour { new_identifier, new_colour, true, false }, group { new_group }, uncivilised { new_uncivilised },
+) : HasIdentifierAndColour { new_identifier, new_colour, false, false }, group { new_group }, uncivilised { new_uncivilised },
can_reduce_militancy { new_can_reduce_militancy }, spawn_date { new_spawn_date } {}
IdeologyGroup const& Ideology::get_group() const {
@@ -23,7 +23,7 @@ bool Ideology::get_can_reduce_militancy() const {
return can_reduce_militancy;
}
-Date const& Ideology::get_spawn_date() const {
+Date Ideology::get_spawn_date() const {
return spawn_date;
}
diff --git a/src/openvic-simulation/politics/Ideology.hpp b/src/openvic-simulation/politics/Ideology.hpp
index 046dbc9..bdf9f91 100644
--- a/src/openvic-simulation/politics/Ideology.hpp
+++ b/src/openvic-simulation/politics/Ideology.hpp
@@ -36,7 +36,7 @@ namespace OpenVic {
IdeologyGroup const& get_group() const;
bool is_uncivilised() const;
bool get_can_reduce_militancy() const;
- Date const& get_spawn_date() const;
+ Date get_spawn_date() const;
};
struct IdeologyManager {