aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/misc
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/misc
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/misc')
-rw-r--r--src/openvic-simulation/misc/Define.hpp2
-rw-r--r--src/openvic-simulation/misc/Modifier.cpp2
-rw-r--r--src/openvic-simulation/misc/Modifier.hpp7
3 files changed, 6 insertions, 5 deletions
diff --git a/src/openvic-simulation/misc/Define.hpp b/src/openvic-simulation/misc/Define.hpp
index 64eb605..3f7b3dc 100644
--- a/src/openvic-simulation/misc/Define.hpp
+++ b/src/openvic-simulation/misc/Define.hpp
@@ -14,7 +14,7 @@ namespace OpenVic {
enum class Type : unsigned char { Date, Country, Economy, Military, Diplomacy, Pops, Ai, Graphics };
private:
- const std::string PROPERTY(value);
+ std::string PROPERTY(value);
const Type PROPERTY(type);
Define(std::string_view new_identifier, std::string&& new_value, Type new_type);
diff --git a/src/openvic-simulation/misc/Modifier.cpp b/src/openvic-simulation/misc/Modifier.cpp
index 25d0cf9..4d6abb7 100644
--- a/src/openvic-simulation/misc/Modifier.cpp
+++ b/src/openvic-simulation/misc/Modifier.cpp
@@ -276,7 +276,7 @@ bool ModifierManager::register_complex_modifier(std::string_view identifier) {
}
std::string ModifierManager::get_flat_identifier(
- const std::string_view complex_modifier_identifier, const std::string_view variant_identifier
+ std::string_view complex_modifier_identifier, std::string_view variant_identifier
) {
return StringUtils::append_string_views(complex_modifier_identifier, " ", variant_identifier);
}
diff --git a/src/openvic-simulation/misc/Modifier.hpp b/src/openvic-simulation/misc/Modifier.hpp
index 798b01d..58b335d 100644
--- a/src/openvic-simulation/misc/Modifier.hpp
+++ b/src/openvic-simulation/misc/Modifier.hpp
@@ -74,7 +74,7 @@ namespace OpenVic {
const icon_t PROPERTY(icon);
protected:
- Modifier(std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon);
+ Modifier(std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon = 0);
public:
Modifier(Modifier&&) = default;
@@ -135,8 +135,9 @@ namespace OpenVic {
);
bool register_complex_modifier(std::string_view identifier);
- static std::string
- get_flat_identifier(const std::string_view complex_modifier_identifier, const std::string_view variant_identifier);
+ static std::string get_flat_identifier(
+ std::string_view complex_modifier_identifier, std::string_view variant_identifier
+ );
bool setup_modifier_effects();