Browse Source

Properly move in shader move constructor/assignment.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
4d3865c10c
  1. 4
      src/Shader.cpp

4
src/Shader.cpp

@ -62,7 +62,7 @@ Shader::Shader(Version version, Type type): _type(type), _state(State::Initializ
CORRADE_ASSERT_UNREACHABLE(); CORRADE_ASSERT_UNREACHABLE();
} }
Shader::Shader(Shader&& other): _type(other._type), _state(other._state), sources(other.sources), shader(other.shader) { Shader::Shader(Shader&& other): _type(other._type), _state(other._state), sources(std::move(other.sources)), shader(other.shader) {
other.shader = 0; other.shader = 0;
} }
@ -71,7 +71,7 @@ Shader& Shader::operator=(Shader&& other) {
_type = other._type; _type = other._type;
_state = other._state; _state = other._state;
sources = other.sources; sources = std::move(other.sources);
shader = other.shader; shader = other.shader;
other.shader = 0; other.shader = 0;

Loading…
Cancel
Save