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/economy | |
parent | 5764126f4a3940320990a9bc3007ba22e89a514c (diff) |
Removed unnecessary `const std::string_view`s
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r-- | src/openvic-simulation/economy/Good.cpp | 8 | ||||
-rw-r--r-- | src/openvic-simulation/economy/Good.hpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp index 8a04e39..0fd4618 100644 --- a/src/openvic-simulation/economy/Good.cpp +++ b/src/openvic-simulation/economy/Good.cpp @@ -5,9 +5,9 @@ using namespace OpenVic; using namespace OpenVic::NodeTools; -GoodCategory::GoodCategory(const std::string_view new_identifier) : HasIdentifier { new_identifier } {} +GoodCategory::GoodCategory(std::string_view new_identifier) : HasIdentifier { new_identifier } {} -Good::Good(const std::string_view new_identifier, colour_t new_colour, GoodCategory const& new_category, price_t new_base_price, +Good::Good(std::string_view new_identifier, colour_t new_colour, GoodCategory const& new_category, price_t new_base_price, bool new_available_from_start, bool new_tradeable, bool new_money, bool new_overseas_penalty) : HasIdentifierAndColour { new_identifier, new_colour, true, false }, category { new_category }, @@ -58,7 +58,7 @@ void Good::reset_to_defaults() { GoodManager::GoodManager() : good_categories { "good categories" }, goods { "goods" } {} -bool GoodManager::add_good_category(const std::string_view identifier) { +bool GoodManager::add_good_category(std::string_view identifier) { if (identifier.empty()) { Logger::error("Invalid good category identifier - empty!"); return false; @@ -66,7 +66,7 @@ bool GoodManager::add_good_category(const std::string_view identifier) { return good_categories.add_item({ identifier }); } -bool GoodManager::add_good(const std::string_view identifier, colour_t colour, GoodCategory const* category, +bool GoodManager::add_good(std::string_view identifier, colour_t colour, GoodCategory const* category, Good::price_t base_price, bool available_from_start, bool tradeable, bool money, bool overseas_penalty) { if (identifier.empty()) { Logger::error("Invalid good identifier - empty!"); diff --git a/src/openvic-simulation/economy/Good.hpp b/src/openvic-simulation/economy/Good.hpp index 792336d..7f020fe 100644 --- a/src/openvic-simulation/economy/Good.hpp +++ b/src/openvic-simulation/economy/Good.hpp @@ -9,7 +9,7 @@ namespace OpenVic { friend struct GoodManager; private: - GoodCategory(const std::string_view new_identifier); + GoodCategory(std::string_view new_identifier); public: GoodCategory(GoodCategory&&) = default; @@ -40,7 +40,7 @@ namespace OpenVic { const bool available_from_start, tradeable, money, overseas_penalty; bool available; - Good(const std::string_view new_identifier, colour_t new_colour, GoodCategory const& new_category, price_t new_base_price, + Good(std::string_view new_identifier, colour_t new_colour, GoodCategory const& new_category, price_t new_base_price, bool new_available_from_start, bool new_tradeable, bool new_money, bool new_overseas_penalty); public: @@ -65,10 +65,10 @@ namespace OpenVic { public: GoodManager(); - bool add_good_category(const std::string_view identifier); + bool add_good_category(std::string_view identifier); IDENTIFIER_REGISTRY_ACCESSORS_CUSTOM_PLURAL(GoodCategory, good_category, good_categories) - bool add_good(const std::string_view identifier, colour_t colour, GoodCategory const* category, Good::price_t base_price, + bool add_good(std::string_view identifier, colour_t colour, GoodCategory const* category, Good::price_t base_price, bool available_from_start, bool tradeable, bool money, bool overseas_penalty); IDENTIFIER_REGISTRY_ACCESSORS(Good, good) |