diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-28 22:03:14 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-28 22:03:14 +0200 |
commit | 84b5ee7a7749e2dbfeb214b4cedd16d5522f4197 (patch) | |
tree | cd810aceed54196aa62aa766f79039cd57a1e600 /src/openvic-simulation/Modifier.cpp | |
parent | 5764126f4a3940320990a9bc3007ba22e89a514c (diff) |
Removed unnecessary `const std::string_view`s
Diffstat (limited to 'src/openvic-simulation/Modifier.cpp')
-rw-r--r-- | src/openvic-simulation/Modifier.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/Modifier.cpp b/src/openvic-simulation/Modifier.cpp index 3ec5474..3acfa56 100644 --- a/src/openvic-simulation/Modifier.cpp +++ b/src/openvic-simulation/Modifier.cpp @@ -3,7 +3,7 @@ using namespace OpenVic; using namespace OpenVic::NodeTools; -ModifierEffect::ModifierEffect(const std::string_view new_identifier, bool new_positive_good) +ModifierEffect::ModifierEffect(std::string_view new_identifier, bool new_positive_good) : HasIdentifier { new_identifier }, positive_good { new_positive_good } {} bool ModifierEffect::get_positive_good() const { @@ -74,7 +74,7 @@ ModifierValue ModifierValue::operator-(ModifierValue const& right) const { return ret -= right; } -Modifier::Modifier(const std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon) +Modifier::Modifier(std::string_view new_identifier, ModifierValue&& new_values, icon_t new_icon) : HasIdentifier { new_identifier }, ModifierValue { std::move(new_values) }, icon { new_icon } {} Modifier::icon_t Modifier::get_icon() const { @@ -94,7 +94,7 @@ Date const& ModifierInstance::get_expiry_date() const { ModifierManager::ModifierManager() : modifier_effects { "modifier effects"}, modifiers { "modifiers" } {} -bool ModifierManager::add_modifier_effect(const std::string_view identifier, bool positive_good) { +bool ModifierManager::add_modifier_effect(std::string_view identifier, bool positive_good) { if (identifier.empty()) { Logger::error("Invalid modifier effect identifier - empty!"); return false; @@ -102,7 +102,7 @@ bool ModifierManager::add_modifier_effect(const std::string_view identifier, boo return modifier_effects.add_item({ identifier, positive_good }); } -bool ModifierManager::add_modifier(const std::string_view identifier, ModifierValue&& values, Modifier::icon_t icon) { +bool ModifierManager::add_modifier(std::string_view identifier, ModifierValue&& values, Modifier::icon_t icon) { if (identifier.empty()) { Logger::error("Invalid modifier effect identifier - empty!"); return false; |