aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/pop/Religion.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-09-29 01:03:54 +0200
committer GitHub <noreply@github.com>2023-09-29 01:03:54 +0200
commit04795924456062db1631686a90f13d963791ad34 (patch)
tree745235805b36eb98092c072fba884263d794dba5 /src/openvic-simulation/pop/Religion.cpp
parent5764126f4a3940320990a9bc3007ba22e89a514c (diff)
parent1e40569a49ab0d557a2a43ee900f4f28d5c81cd3 (diff)
Merge pull request #39 from OpenVicProject/cleanup
Cleanup
Diffstat (limited to 'src/openvic-simulation/pop/Religion.cpp')
-rw-r--r--src/openvic-simulation/pop/Religion.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/openvic-simulation/pop/Religion.cpp b/src/openvic-simulation/pop/Religion.cpp
index acdcad0..32a3219 100644
--- a/src/openvic-simulation/pop/Religion.cpp
+++ b/src/openvic-simulation/pop/Religion.cpp
@@ -5,9 +5,9 @@
using namespace OpenVic;
using namespace OpenVic::NodeTools;
-ReligionGroup::ReligionGroup(const std::string_view new_identifier) : HasIdentifier { new_identifier } {}
+ReligionGroup::ReligionGroup(std::string_view new_identifier) : HasIdentifier { new_identifier } {}
-Religion::Religion(const std::string_view new_identifier, colour_t new_colour,
+Religion::Religion(std::string_view new_identifier, colour_t new_colour,
ReligionGroup const& new_group, icon_t new_icon, bool new_pagan)
: HasIdentifierAndColour { new_identifier, new_colour, true, false },
group { new_group },
@@ -32,7 +32,7 @@ ReligionManager::ReligionManager()
: religion_groups { "religion groups" },
religions { "religions" } {}
-bool ReligionManager::add_religion_group(const std::string_view identifier) {
+bool ReligionManager::add_religion_group(std::string_view identifier) {
if (identifier.empty()) {
Logger::error("Invalid religion group identifier - empty!");
return false;
@@ -40,7 +40,7 @@ bool ReligionManager::add_religion_group(const std::string_view identifier) {
return religion_groups.add_item({ identifier });
}
-bool ReligionManager::add_religion(const std::string_view identifier, colour_t colour, ReligionGroup const* group, Religion::icon_t icon, bool pagan) {
+bool ReligionManager::add_religion(std::string_view identifier, colour_t colour, ReligionGroup const* group, Religion::icon_t icon, bool pagan) {
if (!religion_groups.is_locked()) {
Logger::error("Cannot register religions until religion groups are locked!");
return false;
@@ -91,7 +91,7 @@ bool ReligionManager::load_religion_file(ast::NodeCPtr root) {
bool pagan = false;
bool ret = expect_dictionary_keys(
- "icon", ONE_EXACTLY, expect_uint(assign_variable_callback_uint("religion icon", icon)),
+ "icon", ONE_EXACTLY, expect_uint(assign_variable_callback_uint(icon)),
"color", ONE_EXACTLY, expect_colour(assign_variable_callback(colour)),
"pagan", ZERO_OR_ONE, expect_bool(assign_variable_callback(pagan))
)(value);