aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/TerrainType.cpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-09-28 22:03:14 +0200
committer Hop311 <hop3114@gmail.com>2023-09-28 22:03:14 +0200
commit84b5ee7a7749e2dbfeb214b4cedd16d5522f4197 (patch)
treecd810aceed54196aa62aa766f79039cd57a1e600 /src/openvic-simulation/map/TerrainType.cpp
parent5764126f4a3940320990a9bc3007ba22e89a514c (diff)
Removed unnecessary `const std::string_view`s
Diffstat (limited to 'src/openvic-simulation/map/TerrainType.cpp')
-rw-r--r--src/openvic-simulation/map/TerrainType.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/map/TerrainType.cpp b/src/openvic-simulation/map/TerrainType.cpp
index e688625..24cfb7d 100644
--- a/src/openvic-simulation/map/TerrainType.cpp
+++ b/src/openvic-simulation/map/TerrainType.cpp
@@ -5,14 +5,14 @@
using namespace OpenVic;
using namespace OpenVic::NodeTools;
-TerrainType::TerrainType(const std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_values, bool new_is_water)
+TerrainType::TerrainType(std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_values, bool new_is_water)
: HasIdentifierAndColour { new_identifier, new_colour, true, false }, ModifierValue { std::move(new_values) }, is_water { new_is_water } {}
bool TerrainType::get_is_water() const {
return is_water;
}
-TerrainTypeMapping::TerrainTypeMapping(const std::string_view new_identifier, TerrainType const& new_type,
+TerrainTypeMapping::TerrainTypeMapping(std::string_view new_identifier, TerrainType const& new_type,
std::vector<index_t>&& new_terrain_indicies, index_t new_priority, bool new_has_texture)
: HasIdentifier { new_identifier }, type { new_type }, terrain_indicies { std::move(new_terrain_indicies) },
priority { new_priority }, has_texture { new_has_texture } {}
@@ -35,7 +35,7 @@ bool TerrainTypeMapping::get_has_texture() const {
TerrainTypeManager::TerrainTypeManager() : terrain_types { "terrain types" }, terrain_type_mappings { "terrain type mappings" } {}
-bool TerrainTypeManager::add_terrain_type(const std::string_view identifier, colour_t colour, ModifierValue&& values, bool is_water) {
+bool TerrainTypeManager::add_terrain_type(std::string_view identifier, colour_t colour, ModifierValue&& values, bool is_water) {
if (identifier.empty()) {
Logger::error("Invalid terrain type identifier - empty!");
return false;
@@ -47,7 +47,7 @@ bool TerrainTypeManager::add_terrain_type(const std::string_view identifier, col
return terrain_types.add_item({ identifier, colour, std::move(values), is_water });
}
-bool TerrainTypeManager::add_terrain_type_mapping(const std::string_view identifier, TerrainType const* type,
+bool TerrainTypeManager::add_terrain_type_mapping(std::string_view identifier, TerrainType const* type,
std::vector<TerrainTypeMapping::index_t>&& terrain_indicies, TerrainTypeMapping::index_t priority, bool has_texture) {
if (!terrain_types.is_locked()) {
Logger::error("Cannot register terrain type mappings until terrain types are locked!");