summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/compound_expression.cpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-24 18:19:00 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-25 11:43:37 +0300
commit54e3a05d522445307b493937081b5a32cae09361 (patch)
tree48d822d20a89743ea93dd0fd15a5878b9609d8b4 /src/mbgl/style/expression/compound_expression.cpp
parent7ce892366d89964a04361201db66bced4dc01dee (diff)
downloadqtlocation-mapboxgl-upstream/mikhail_avoid_feature_properties_copying.tar.gz
[core] Avoid copying feature propertiesupstream/mikhail_avoid_feature_properties_copying
Diffstat (limited to 'src/mbgl/style/expression/compound_expression.cpp')
-rw-r--r--src/mbgl/style/expression/compound_expression.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/style/expression/compound_expression.cpp b/src/mbgl/style/expression/compound_expression.cpp
index cc1d58025b..34f0f5dea3 100644
--- a/src/mbgl/style/expression/compound_expression.cpp
+++ b/src/mbgl/style/expression/compound_expression.cpp
@@ -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);
}