diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-04-04 19:04:50 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-04-05 11:24:57 +0300 |
commit | 35bcb7c0722897879fcdc2fb71c6fb9fa5798e79 (patch) | |
tree | 7c75678ab9cec372bb2f6deac8a4494c42e33f6c | |
parent | 1a5b933983d5b30b7a2947bbdf152122c38e11c1 (diff) | |
download | qtlocation-mapboxgl-35bcb7c0722897879fcdc2fb71c6fb9fa5798e79.tar.gz |
[core] Pass crossfade parameters by const reference
-rw-r--r-- | src/mbgl/renderer/paint_property_binder.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index dd56afb2e8..a54cb8fc34 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -100,7 +100,7 @@ public: const optional<PatternDependency>&, const style::expression::Value&) = 0; virtual void upload(gfx::Context& context) = 0; - virtual void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, CrossfadeParameters&) = 0; + virtual void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, const CrossfadeParameters&) = 0; virtual std::tuple<ExpandToType<As, optional<gfx::AttributeBinding>>...> attributeBinding(const PossiblyEvaluatedType& currentValue) const = 0; virtual std::tuple<ExpandToType<As, float>...> interpolationFactor(float currentZoom) const = 0; virtual std::tuple<ExpandToType<As, UniformValueType>...> uniformValue(const PossiblyEvaluatedType& currentValue) const = 0; @@ -119,7 +119,7 @@ public: void populateVertexVector(const GeometryTileFeature&, std::size_t, const ImagePositions&, const optional<PatternDependency>&, const style::expression::Value&) override {} void upload(gfx::Context&) override {} - void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, CrossfadeParameters&) override {}; + void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, const CrossfadeParameters&) override {}; std::tuple<optional<gfx::AttributeBinding>> attributeBinding(const PossiblyEvaluatedPropertyValue<T>&) const override { return {}; @@ -147,7 +147,7 @@ public: void populateVertexVector(const GeometryTileFeature&, std::size_t, const ImagePositions&, const optional<PatternDependency>&, const style::expression::Value&) override {} void upload(gfx::Context&) override {} - void setPatternParameters(const optional<ImagePosition>& posA, const optional<ImagePosition>& posB, CrossfadeParameters&) override { + void setPatternParameters(const optional<ImagePosition>& posA, const optional<ImagePosition>& posB, const CrossfadeParameters&) override { if (!posA || !posB) { return; } else { @@ -185,7 +185,7 @@ public: : expression(std::move(expression_)), defaultValue(std::move(defaultValue_)) { } - void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, CrossfadeParameters&) override {}; + void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, const CrossfadeParameters&) override {}; void populateVertexVector(const GeometryTileFeature& feature, std::size_t length, const ImagePositions&, const optional<PatternDependency>&, const style::expression::Value& formattedSection) override { using style::expression::EvaluationContext; auto evaluated = expression.evaluate(EvaluationContext(&feature).withFormattedSection(&formattedSection), defaultValue); @@ -243,7 +243,7 @@ public: defaultValue(std::move(defaultValue_)), zoomRange({zoom, zoom + 1}) { } - void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, CrossfadeParameters&) override {}; + void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, const CrossfadeParameters&) override {}; void populateVertexVector(const GeometryTileFeature& feature, std::size_t length, const ImagePositions&, const optional<PatternDependency>&, const style::expression::Value& formattedSection) override { using style::expression::EvaluationContext; Range<T> range = { @@ -317,7 +317,7 @@ public: zoomRange({zoom, zoom + 1}) { } - void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, CrossfadeParameters& crossfade_) override { + void setPatternParameters(const optional<ImagePosition>&, const optional<ImagePosition>&, const CrossfadeParameters& crossfade_) override { crossfade = crossfade_; }; @@ -486,7 +486,7 @@ public: }); } - void setPatternParameters(const optional<ImagePosition>& posA, const optional<ImagePosition>& posB, CrossfadeParameters& crossfade) const { + void setPatternParameters(const optional<ImagePosition>& posA, const optional<ImagePosition>& posB, const CrossfadeParameters& crossfade) const { util::ignore({ (binders.template get<Ps>()->setPatternParameters(posA, posB, crossfade), 0)... }); |