From 1533d28314fe869ad3f1772872e99516eab76e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Thu, 3 Nov 2016 17:58:52 +0100 Subject: [PATCH] [core] move Value class outside of Uniform to enforce explicit construction --- src/mbgl/gl/uniform.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp index b6723e2e4..40a48d3af 100644 --- a/src/mbgl/gl/uniform.hpp +++ b/src/mbgl/gl/uniform.hpp @@ -13,13 +13,17 @@ namespace gl { template void bindUniform(UniformLocation, const T&); +template +class UniformValue { +public: + explicit UniformValue(T t_) : t(std::move(t_)) {} + T t; +}; + template class Uniform { public: - class Value { - public: - T t; - }; + using Value = UniformValue; class State { public: