summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/uniform.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl/uniform.hpp')
-rw-r--r--src/mbgl/gl/uniform.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp
index 9f752de8af..6714379217 100644
--- a/src/mbgl/gl/uniform.hpp
+++ b/src/mbgl/gl/uniform.hpp
@@ -39,11 +39,13 @@ class UniformState {
public:
UniformState(UniformLocation location_ = -1) : location(location_) {}
- void operator=(const Value& value) {
+ UniformState& operator=(const Value& value) {
if (location >= 0 && (!current || *current != value)) {
current = value;
bindUniform(location, value);
}
+
+ return *this;
}
UniformLocation location;