Allow --set-attribute to override existing attribute values (#123)

* Allow --set-attribute to override existing attribute values

* Bump version number
This commit is contained in:
Erica Fischer
2023-07-26 11:05:35 -07:00
committed by GitHub
parent 4318e964e3
commit 55b9aa501c
4 changed files with 6333 additions and 3 deletions
+4
View File
@@ -1,3 +1,7 @@
# 2.28.1
* Allow --set-attribute to override an existing attribute value
# 2.28.0
* Add --preserve-point-density-threshold option to reduce blank areas of the map at low zooms
+13 -2
View File
@@ -630,8 +630,19 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
}
for (auto &kv : set_attributes) {
sf.full_keys.push_back(kv.first);
sf.full_values.push_back(kv.second);
bool found = false;
for (size_t i = 0; i < sf.full_keys.size(); i++) {
if (sf.full_keys[i] == kv.first) {
sf.full_values[i] = kv.second;
found = true;
break;
}
}
if (!found) {
sf.full_keys.push_back(kv.first);
sf.full_values.push_back(kv.second);
}
}
for (ssize_t i = (ssize_t) sf.full_keys.size() - 1; i >= 0; i--) {
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "v2.28.0"
#define VERSION "v2.28.1"
#endif