From ec62e321531b1a836074056e86de8e20018280fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Mon, 4 Jun 2018 15:28:23 +0200 Subject: [core] move PaintProperty::Attribute to TypeList and pass to Binder constructors --- src/mbgl/renderer/paint_property_binder.hpp | 19 ++++++++++++++++--- src/mbgl/style/paint_property.hpp | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index cf0a71847e..29eb716785 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -269,9 +269,22 @@ class PaintPropertyBinders; template class PaintPropertyBinders> { +private: + template + struct Detail; + + template + struct Detail> { + using Binder = PaintPropertyBinder; + using ZoomInterpolatedAttributeList = TypeList...>; + }; + + template + using Property = Detail; + public: template - using Binder = PaintPropertyBinder; + using Binder = typename Property

::Binder; using Binders = IndexedTuple< TypeList, @@ -299,9 +312,9 @@ public: } template - using Attribute = ZoomInterpolatedAttribute; + using ZoomInterpolatedAttributeList = typename Property

::ZoomInterpolatedAttributeList; - using Attributes = gl::Attributes...>; + using Attributes = typename TypeListConcat...>::template ExpandInto; using AttributeBindings = typename Attributes::Bindings; template diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp index 3d9d7710dc..1afc1e5734 100644 --- a/src/mbgl/style/paint_property.hpp +++ b/src/mbgl/style/paint_property.hpp @@ -34,6 +34,7 @@ public: static constexpr bool IsDataDriven = true; using Attribute = A; + using Attributes = TypeList; using Uniform = U; }; -- cgit v1.2.1