Browse Source

Fix compilation on GCC 6.3.

This is just sad.
pull/193/head
Vladimír Vondruš 9 years ago
parent
commit
9ab2a1553c
  1. 8
      src/Magnum/AbstractTexture.cpp

8
src/Magnum/AbstractTexture.cpp

@ -120,7 +120,9 @@ void AbstractTexture::unbind(const Int textureUnit) {
/* Unbind the texture, reset state tracker */
Context::current().state().texture->unbindImplementation(textureUnit);
textureState.bindings[textureUnit] = {};
/* libstdc++ since GCC 6.3 can't handle just = {} (ambiguous overload of
operator=) */
textureState.bindings[textureUnit] = std::pair<GLenum, GLuint>{};
}
void AbstractTexture::unbindImplementationDefault(const GLint textureUnit) {
@ -237,7 +239,9 @@ AbstractTexture::~AbstractTexture() {
/* Remove all bindings */
for(auto& binding: Context::current().state().texture->bindings) {
/* MSVC 2015 needs the parentheses around */
if(binding.second == _id) binding = {};
/* libstdc++ since GCC 6.3 can't handle just = {} (ambiguous overload
of operator=) */
if(binding.second == _id) binding = std::pair<GLenum, GLuint>{};
}
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)

Loading…
Cancel
Save