From 54e3a05d522445307b493937081b5a32cae09361 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Wed, 24 Jul 2019 18:19:00 +0300 Subject: [core] Avoid copying feature properties --- src/mbgl/style/expression/compound_expression.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mbgl/style/expression/compound_expression.cpp') 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 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); } -- cgit v1.2.1