summaryrefslogtreecommitdiff
path: root/src/mbgl/gl
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-06-01 11:49:15 +0200
committerMolly Lloyd <mollymerp@users.noreply.github.com>2018-08-31 13:08:47 -0700
commit5e9bbfdd44ef9c0a2c5850566c28a40aa2a05151 (patch)
treec988c26ea070063adb4a584485625ac5e7ec2ec5 /src/mbgl/gl
parent748e6bde5f611cfba3419c272d3cbf1d5c1350ef (diff)
downloadqtlocation-mapboxgl-5e9bbfdd44ef9c0a2c5850566c28a40aa2a05151.tar.gz
[core] introduce TypeListConcat and TypeList::ExpandInto
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r--src/mbgl/gl/attribute.hpp18
-rw-r--r--src/mbgl/gl/uniform.hpp19
2 files changed, 4 insertions, 33 deletions
diff --git a/src/mbgl/gl/attribute.hpp b/src/mbgl/gl/attribute.hpp
index de95be0733..8cdb03bfe7 100644
--- a/src/mbgl/gl/attribute.hpp
+++ b/src/mbgl/gl/attribute.hpp
@@ -294,22 +294,8 @@ public:
}
};
-namespace detail {
-
-template <class...>
-struct ConcatenateAttributes;
-
-template <class... As, class... Bs>
-struct ConcatenateAttributes<TypeList<As...>, TypeList<Bs...>> {
- using Type = Attributes<As..., Bs...>;
-};
-
-} // namespace detail
-
-template <class A, class B>
-using ConcatenateAttributes = typename detail::ConcatenateAttributes<
- typename A::Types,
- typename B::Types>::Type;
+template <class... As>
+using ConcatenateAttributes = typename TypeListConcat<typename As::Types...>::template ExpandInto<Attributes>;
} // namespace gl
} // namespace mbgl
diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp
index 5a78068fc8..d8a167c382 100644
--- a/src/mbgl/gl/uniform.hpp
+++ b/src/mbgl/gl/uniform.hpp
@@ -120,23 +120,8 @@ public:
}
};
-
-namespace detail {
-
-template <class...>
-struct ConcatenateUniforms;
-
-template <class... As, class... Bs>
-struct ConcatenateUniforms<TypeList<As...>, TypeList<Bs...>> {
- using Type = Uniforms<As..., Bs...>;
-};
-
-} // namespace detail
-
-template <class A, class B>
-using ConcatenateUniforms = typename detail::ConcatenateUniforms<
- typename A::Types,
- typename B::Types>::Type;
+template <class... Us>
+using ConcatenateUniforms = typename TypeListConcat<typename Us::Types...>::template ExpandInto<Uniforms>;
} // namespace gl
} // namespace mbgl