diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-27 18:30:35 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-04-17 13:36:50 +0300 |
commit | aab575263f8338ae027993f8ce8d4fb47e5a3fd0 (patch) | |
tree | d4e694c7e2073d6a614dd88e4b8d76b3b9fdcb90 | |
parent | c21cf413b82f40a6e978120a49ce72e327b0e85e (diff) | |
download | qtlocation-mapboxgl-aab575263f8338ae027993f8ce8d4fb47e5a3fd0.tar.gz |
[core] Fix performance-unnecessary-copy-initialization errors in header files
As reported by clang-tidy-8.
-rw-r--r-- | src/mbgl/layout/pattern_layout.hpp | 4 |
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 |