Const references!

This commit is contained in:
Erica Fischer
2024-01-25 10:27:26 -08:00
parent e1e9b7286a
commit e6e5ffc65d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -583,7 +583,7 @@ std::string mvt_value::toString() const {
}
}
void mvt_layer::tag(mvt_feature &feature, std::string key, mvt_value value) {
void mvt_layer::tag(mvt_feature &feature, std::string const &key, mvt_value const &value) {
size_t ko, vo;
// initialize lazily the first time anyone tags an attribute
+1 -1
View File
@@ -143,7 +143,7 @@ struct mvt_layer {
long long extent = 0;
// Add a key-value pair to a feature, using this layer's constant pool
void tag(mvt_feature &feature, std::string key, mvt_value value);
void tag(mvt_feature &feature, std::string const &key, mvt_value const &value);
// For tracking the key-value constants already used in this layer
std::unordered_map<std::string, size_t> key_map{};