aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/diplomacy
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-07-19 21:35:31 +0200
committer GitHub <noreply@github.com>2024-07-19 21:35:31 +0200
commitd1f3a96b72dd06b5f97dd4643e5f016a02b42ea6 (patch)
tree38015e5729afbb98cf520e2cf26d8a4623d32f2f /src/openvic-simulation/diplomacy
parente0518bee9b4c164f40716a8033b5e207c2060c0b (diff)
parent03647d2249f72b6545628bb844685f87c4581062 (diff)
Merge pull request #176 from OpenVicProject/format-cleanup
Cleanup: inheritance, const movable variables, code formatting
Diffstat (limited to 'src/openvic-simulation/diplomacy')
-rw-r--r--src/openvic-simulation/diplomacy/DiplomaticAction.cpp4
-rw-r--r--src/openvic-simulation/diplomacy/DiplomaticAction.hpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/openvic-simulation/diplomacy/DiplomaticAction.cpp b/src/openvic-simulation/diplomacy/DiplomaticAction.cpp
index 41c0aa2..721411f 100644
--- a/src/openvic-simulation/diplomacy/DiplomaticAction.cpp
+++ b/src/openvic-simulation/diplomacy/DiplomaticAction.cpp
@@ -13,9 +13,7 @@ DiplomaticActionType::DiplomaticActionType(DiplomaticActionType::Initializer&& i
get_acceptance { std::move(initializer.get_acceptance) } {}
CancelableDiplomaticActionType::CancelableDiplomaticActionType(CancelableDiplomaticActionType::Initializer&& initializer)
- : allowed_to_cancel { std::move(initializer.allowed_cancel) }, DiplomaticActionType(std::move(initializer)) {}
-
-DiplomaticActionManager::DiplomaticActionManager() {}
+ : allowed_to_cancel { std::move(initializer.allowed_cancel) }, DiplomaticActionType { std::move(initializer) } {}
bool DiplomaticActionManager::add_diplomatic_action(
std::string_view identifier, DiplomaticActionType::Initializer&& initializer
diff --git a/src/openvic-simulation/diplomacy/DiplomaticAction.hpp b/src/openvic-simulation/diplomacy/DiplomaticAction.hpp
index cf93c75..281707b 100644
--- a/src/openvic-simulation/diplomacy/DiplomaticAction.hpp
+++ b/src/openvic-simulation/diplomacy/DiplomaticAction.hpp
@@ -123,7 +123,7 @@ namespace OpenVic {
IdentifierRegistry<DiplomaticActionTypeStorage> IDENTIFIER_REGISTRY(diplomatic_action_type);
public:
- DiplomaticActionManager();
+ DiplomaticActionManager() = default;
bool add_diplomatic_action(std::string_view identifier, DiplomaticActionType::Initializer&& initializer);
bool add_cancelable_diplomatic_action(