diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-03-13 11:19:14 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-21 13:48:14 +0100 |
commit | 40b5e45682729d9c5ce23d4041bcd3e9c23614ba (patch) | |
tree | 8f8705752e81f3097b1a89e0413f7deda66a6419 | |
parent | a4de63cf8bd439354ff2124a5039fd6524652ade (diff) | |
download | qtlocation-mapboxgl-40b5e45682729d9c5ce23d4041bcd3e9c23614ba.tar.gz |
[core] mirror gfx::AttributeBindings for gfx::TextureBindings and gfx::UniformValues
-rw-r--r-- | src/mbgl/gfx/texture.hpp | 16 | ||||
-rw-r--r-- | src/mbgl/gfx/uniform.hpp | 15 |
2 files changed, 14 insertions, 17 deletions
diff --git a/src/mbgl/gfx/texture.hpp b/src/mbgl/gfx/texture.hpp index 758bdd1b09..a957c4ebdf 100644 --- a/src/mbgl/gfx/texture.hpp +++ b/src/mbgl/gfx/texture.hpp @@ -52,21 +52,19 @@ public: TextureWrapType wrapY; }; -namespace detail { - template <class> class TextureBindings; template <class... Ts> -class TextureBindings<TypeList<Ts...>> { +class TextureBindings<TypeList<Ts...>> final + : public IndexedTuple<TypeList<Ts...>, TypeList<ExpandToType<Ts, TextureBinding>...>> { + using Base = IndexedTuple<TypeList<Ts...>, TypeList<ExpandToType<Ts, TextureBinding>...>>; + public: - using Type = IndexedTuple<TypeList<Ts...>, TypeList<ExpandToType<Ts, TextureBinding>...>>; + template <class... Args> + TextureBindings(Args&&... args) : Base(std::forward<Args>(args)...) { + } }; -} // namespace detail - -template <class TextureTypeList> -using TextureBindings = typename detail::TextureBindings<TextureTypeList>::Type; - } // namespace gfx } // namespace mbgl diff --git a/src/mbgl/gfx/uniform.hpp b/src/mbgl/gfx/uniform.hpp index bc6e7c1866..f6896b9138 100644 --- a/src/mbgl/gfx/uniform.hpp +++ b/src/mbgl/gfx/uniform.hpp @@ -31,21 +31,20 @@ namespace mbgl { namespace gfx { -namespace detail { template <class> class UniformValues; template <class... Us> -class UniformValues<TypeList<Us...>> { +class UniformValues<TypeList<Us...>> final + : public IndexedTuple<TypeList<Us...>, TypeList<typename Us::Value...>> { + using Base = IndexedTuple<TypeList<Us...>, TypeList<typename Us::Value...>>; + public: - using Type = IndexedTuple<TypeList<Us...>, TypeList<typename Us::Value...>>; + template <class... Args> + UniformValues(Args&&... args) : Base(std::forward<Args>(args)...) { + } }; -} // namespace detail - -template <class UniformTypeList> -using UniformValues = typename detail::UniformValues<UniformTypeList>::Type; - } // namespace gfx } // namespace mbgl |