diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-11-03 17:58:52 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-11-07 18:51:47 +0100 |
commit | 1533d28314fe869ad3f1772872e99516eab76e36 (patch) | |
tree | 741c860fac95515fadf52535b8fef425c94047dc /src/mbgl/gl | |
parent | bd3d4bc89a7ce072a32782f2113ef5d838a7913c (diff) | |
download | qtlocation-mapboxgl-1533d28314fe869ad3f1772872e99516eab76e36.tar.gz |
[core] move Value class outside of Uniform to enforce explicit construction
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r-- | src/mbgl/gl/uniform.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp index b6723e2e4d..40a48d3af3 100644 --- a/src/mbgl/gl/uniform.hpp +++ b/src/mbgl/gl/uniform.hpp @@ -14,12 +14,16 @@ template <class T> void bindUniform(UniformLocation, const T&); template <class Tag, class T> +class UniformValue { +public: + explicit UniformValue(T t_) : t(std::move(t_)) {} + T t; +}; + +template <class Tag, class T> class Uniform { public: - class Value { - public: - T t; - }; + using Value = UniformValue<Tag, T>; class State { public: |