summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-11-03 17:58:52 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-11-07 18:51:47 +0100
commit1533d28314fe869ad3f1772872e99516eab76e36 (patch)
tree741c860fac95515fadf52535b8fef425c94047dc
parentbd3d4bc89a7ce072a32782f2113ef5d838a7913c (diff)
downloadqtlocation-mapboxgl-1533d28314fe869ad3f1772872e99516eab76e36.tar.gz
[core] move Value class outside of Uniform to enforce explicit construction
-rw-r--r--src/mbgl/gl/uniform.hpp12
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: