[core] Avoid copying feature properties

This commit is contained in:
Mikhail Pozdnyakov
2019-07-24 18:19:00 +03:00
parent e6e1e15f95
commit 273ad436fb
9 changed files with 19 additions and 9 deletions

View File

@@ -423,7 +423,8 @@ const auto& propertiesCompoundExpression() {
};
}
std::unordered_map<std::string, Value> result;
const PropertyMap properties = params.feature->getProperties();
const PropertyMap& properties = params.feature->getProperties();
result.reserve(properties.size());
for (const auto& entry : properties) {
result[entry.first] = toExpressionValue(entry.second);
}