diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-06-01 11:49:15 +0200 |
---|---|---|
committer | Molly Lloyd <mollymerp@users.noreply.github.com> | 2018-08-31 13:08:47 -0700 |
commit | 5e9bbfdd44ef9c0a2c5850566c28a40aa2a05151 (patch) | |
tree | c988c26ea070063adb4a584485625ac5e7ec2ec5 /src/mbgl/gl | |
parent | 748e6bde5f611cfba3419c272d3cbf1d5c1350ef (diff) | |
download | qtlocation-mapboxgl-5e9bbfdd44ef9c0a2c5850566c28a40aa2a05151.tar.gz |
[core] introduce TypeListConcat and TypeList::ExpandInto
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r-- | src/mbgl/gl/attribute.hpp | 18 | ||||
-rw-r--r-- | src/mbgl/gl/uniform.hpp | 19 |
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 |