aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military/LeaderTrait.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-10-29 21:14:55 +0100
committer GitHub <noreply@github.com>2023-10-29 21:14:55 +0100
commit06cc0606156d009026930c785c62434276fbe782 (patch)
treed37fcb69766ec029ea4e3e2816c419f9d7e05f7c /src/openvic-simulation/military/LeaderTrait.cpp
parentd8ec90f07342876e9331819bd3cc372050f78248 (diff)
parent1b5e43fa7750cc4025d32f18390593cbce3ba842 (diff)
Merge pull request #67 from OpenVicProject/format
Formating
Diffstat (limited to 'src/openvic-simulation/military/LeaderTrait.cpp')
-rw-r--r--src/openvic-simulation/military/LeaderTrait.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openvic-simulation/military/LeaderTrait.cpp b/src/openvic-simulation/military/LeaderTrait.cpp
index ed21c1f..df87e4e 100644
--- a/src/openvic-simulation/military/LeaderTrait.cpp
+++ b/src/openvic-simulation/military/LeaderTrait.cpp
@@ -24,7 +24,9 @@ ModifierValue const& LeaderTrait::get_modifiers() const {
LeaderTraitManager::LeaderTraitManager() : leader_traits { "leader trait" } {}
-bool LeaderTraitManager::add_leader_trait(std::string_view identifier, LeaderTrait::trait_type_t type, ModifierValue&& modifiers) {
+bool LeaderTraitManager::add_leader_trait(
+ std::string_view identifier, LeaderTrait::trait_type_t type, ModifierValue&& modifiers
+) {
if (identifier.empty()) {
Logger::error("Invalid leader trait identifier - empty!");
return false;
@@ -38,7 +40,8 @@ bool LeaderTraitManager::load_leader_traits_file(ModifierManager const& modifier
const auto trait_callback = [this, &modifier_manager](LeaderTrait::trait_type_t type) -> key_value_callback_t {
return [this, &modifier_manager, type](std::string_view trait_identifier, ast::NodeCPtr value) -> bool {
ModifierValue modifiers;
- bool ret = modifier_manager.expect_whitelisted_modifier_value(move_variable_callback(modifiers), allowed_modifiers)(value);
+ bool ret =
+ modifier_manager.expect_whitelisted_modifier_value(move_variable_callback(modifiers), allowed_modifiers)(value);
ret &= add_leader_trait(trait_identifier, type, std::move(modifiers));
return ret;
};