diff options
author | Hop311 <Hop3114@gmail.com> | 2023-08-12 18:54:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 18:54:55 +0200 |
commit | d3c6ff1809b88b4c99163402f30b6d10c787510f (patch) | |
tree | e4bf26ecfef160e7df7670e73af7f154f1550308 /src/openvic/map/Province.hpp | |
parent | 538e7dc4ec44c4d09a6a654f10229e6392653a50 (diff) | |
parent | afc16e76ba699b24ba1ef1cb1b658ef421c84430 (diff) |
Merge pull request #11 from OpenVicProject/string_view
Changed IdentifierRegistry to use std::string_view when looking up a std::string key
Diffstat (limited to 'src/openvic/map/Province.hpp')
-rw-r--r-- | src/openvic/map/Province.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic/map/Province.hpp b/src/openvic/map/Province.hpp index 3ca5d93..20c5870 100644 --- a/src/openvic/map/Province.hpp +++ b/src/openvic/map/Province.hpp @@ -29,7 +29,7 @@ namespace OpenVic { Pop::pop_size_t total_population; distribution_t pop_types, cultures; - Province(index_t new_index, std::string const& new_identifier, colour_t new_colour); + Province(const std::string_view new_identifier, colour_t new_colour, index_t new_index); public: Province(Province&&) = default; @@ -41,9 +41,9 @@ namespace OpenVic { return_t add_building(Building&& building); void lock_buildings(); void reset_buildings(); - Building const* get_building_by_identifier(std::string const& identifier) const; + Building const* get_building_by_identifier(const std::string_view identifier) const; std::vector<Building> const& get_buildings() const; - return_t expand_building(std::string const& building_type_identifier); + return_t expand_building(const std::string_view building_type_identifier); Good const* get_rgo() const; std::string to_string() const; |