summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mbgl/layout/pattern_layout.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/layout/pattern_layout.hpp b/src/mbgl/layout/pattern_layout.hpp
index 8d612d2589..b2bcd1b319 100644
--- a/src/mbgl/layout/pattern_layout.hpp
+++ b/src/mbgl/layout/pattern_layout.hpp
@@ -93,7 +93,7 @@ public:
for (const auto& layerProperties : group) {
const std::string& layerId = layerProperties->baseImpl->id;
const auto& evaluated = style::getEvaluated<LayerPropertiesType>(layerProperties);
- const auto patternProperty = evaluated.template get<PatternPropertyType>();
+ const auto& patternProperty = evaluated.template get<PatternPropertyType>();
const auto constantPattern = patternProperty.constantOr(Faded<style::expression::Image>{"", ""});
// determine if layer group has any layers that use *-pattern property and add
// constant pattern dependencies.
@@ -122,7 +122,7 @@ public:
const auto it = layerPropertiesMap.find(layerId);
if (it != layerPropertiesMap.end()) {
const auto paint = static_cast<const LayerPropertiesType&>(*it->second).evaluated;
- const auto patternProperty = paint.template get<PatternPropertyType>();
+ const auto& patternProperty = paint.template get<PatternPropertyType>();
if (!patternProperty.isConstant()) {
// For layers with non-data-constant pattern properties, evaluate their expression and add
// the patterns to the dependency vector