diff options
-rw-r--r-- | src/mbgl/renderer/paint_property_binder.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index 82c36399a9..cf0a71847e 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -72,7 +72,7 @@ std::array<float, N*2> zoomInterpolatedAttributeValue(const std::array<float, N> Note that the shader source varies depending on whether we're using a uniform or attribute. Like GL JS, we dynamically compile shaders at runtime to accomodate this. */ -template <class T, class A> +template <class T, class... As> class PaintPropertyBinder { public: @@ -233,18 +233,18 @@ private: optional<gl::VertexBuffer<Vertex>> vertexBuffer; }; -template <class T, class A> -std::unique_ptr<PaintPropertyBinder<T, A>> -PaintPropertyBinder<T, A>::create(const PossiblyEvaluatedPropertyValue<T>& value, float zoom, T defaultValue) { +template <class T, class... As> +std::unique_ptr<PaintPropertyBinder<T, As...>> +PaintPropertyBinder<T, As...>::create(const PossiblyEvaluatedPropertyValue<T>& value, float zoom, T defaultValue) { return value.match( - [&] (const T& constant) -> std::unique_ptr<PaintPropertyBinder<T, A>> { - return std::make_unique<ConstantPaintPropertyBinder<T, A>>(constant); + [&] (const T& constant) -> std::unique_ptr<PaintPropertyBinder<T, As...>> { + return std::make_unique<ConstantPaintPropertyBinder<T, As...>>(constant); }, - [&] (const style::PropertyExpression<T>& expression) -> std::unique_ptr<PaintPropertyBinder<T, A>> { + [&] (const style::PropertyExpression<T>& expression) -> std::unique_ptr<PaintPropertyBinder<T, As...>> { if (expression.isZoomConstant()) { - return std::make_unique<SourceFunctionPaintPropertyBinder<T, A>>(expression, defaultValue); + return std::make_unique<SourceFunctionPaintPropertyBinder<T, As...>>(expression, defaultValue); } else { - return std::make_unique<CompositeFunctionPaintPropertyBinder<T, A>>(expression, zoom, defaultValue); + return std::make_unique<CompositeFunctionPaintPropertyBinder<T, As...>>(expression, zoom, defaultValue); } } ); |