aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/pop/Pop.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-08-12 15:10:40 +0200
committer Hop311 <hop3114@gmail.com>2023-08-12 15:10:40 +0200
commitafc16e76ba699b24ba1ef1cb1b658ef421c84430 (patch)
treee4bf26ecfef160e7df7670e73af7f154f1550308 /src/openvic/pop/Pop.hpp
parent538e7dc4ec44c4d09a6a654f10229e6392653a50 (diff)
std::string const& --> const std::string_view
Diffstat (limited to 'src/openvic/pop/Pop.hpp')
-rw-r--r--src/openvic/pop/Pop.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic/pop/Pop.hpp b/src/openvic/pop/Pop.hpp
index 628194d..5bd1b90 100644
--- a/src/openvic/pop/Pop.hpp
+++ b/src/openvic/pop/Pop.hpp
@@ -57,7 +57,7 @@ namespace OpenVic {
// TODO - rebel composition, life/everyday/luxury needs, country and province migration targets, promote_to targets, ideologies and issues
- PopType(std::string const& new_identifier, colour_t new_colour, strata_t new_strata, sprite_t new_sprite, Pop::pop_size_t new_max_size, Pop::pop_size_t new_merge_max_size,
+ PopType(const std::string_view new_identifier, colour_t new_colour, strata_t new_strata, sprite_t new_sprite, Pop::pop_size_t new_max_size, Pop::pop_size_t new_merge_max_size,
bool new_state_capital_only, bool new_demote_migrant, bool new_is_artisan, bool new_is_slave);
public:
@@ -83,11 +83,11 @@ namespace OpenVic {
public:
PopManager();
- return_t add_pop_type(std::string const& identifier, colour_t new_colour, PopType::strata_t strata, PopType::sprite_t sprite,
+ return_t add_pop_type(const std::string_view identifier, colour_t new_colour, PopType::strata_t strata, PopType::sprite_t sprite,
Pop::pop_size_t max_size, Pop::pop_size_t merge_max_size, bool state_capital_only, bool demote_migrant,
bool is_artisan, bool is_slave);
void lock_pop_types();
- PopType const* get_pop_type_by_identifier(std::string const& identifier) const;
+ PopType const* get_pop_type_by_identifier(const std::string_view identifier) const;
void generate_test_pops(Province& province) const;
};