Browse Source

GCC 4.4 compatibility: ambiguous std::to_string() overload.

Vladimír Vondruš 12 years ago
parent
commit
7898f9b0f3
  1. 16
      src/Magnum/AbstractShaderProgram.cpp
  2. 16
      src/Magnum/Shader.cpp

16
src/Magnum/AbstractShaderProgram.cpp

@ -299,7 +299,13 @@ bool AbstractShaderProgram::link(std::initializer_list<std::reference_wrapper<Ab
out.setFlag(Debug::NewLineAtTheEnd, false);
out.setFlag(Debug::SpaceAfterEachValue, false);
out << "AbstractShaderProgram::link(): linking";
if(shaders.size() != 1) out << " of shader " << std::to_string(i);
if(shaders.size() != 1) {
#ifndef CORRADE_GCC44_COMPATIBILITY
out << " of shader " << std::to_string(i);
#else
out << " of shader " << std::to_string(static_cast<long long int>(i));
#endif
}
out << " failed with the following message:\n"
<< message;
@ -309,7 +315,13 @@ bool AbstractShaderProgram::link(std::initializer_list<std::reference_wrapper<Ab
out.setFlag(Debug::NewLineAtTheEnd, false);
out.setFlag(Debug::SpaceAfterEachValue, false);
out << "AbstractShaderProgram::link(): linking";
if(shaders.size() != 1) out << " of shader " << std::to_string(i);
if(shaders.size() != 1) {
#ifndef CORRADE_GCC44_COMPATIBILITY
out << " of shader " << std::to_string(i);
#else
out << " of shader " << std::to_string(static_cast<long long int>(i));
#endif
}
out << " succeeded with the following message:\n"
<< message;
}

16
src/Magnum/Shader.cpp

@ -679,7 +679,13 @@ bool Shader::compile(std::initializer_list<std::reference_wrapper<Shader>> shade
out.setFlag(Debug::SpaceAfterEachValue, false);
out << "Shader::compile(): compilation of " << shaderName(shader._type)
<< " shader";
if(shaders.size() != 1) out << ' ' << std::to_string(i);
if(shaders.size() != 1) {
#ifndef CORRADE_GCC44_COMPATIBILITY
out << ' ' << std::to_string(i);
#else
out << ' ' << std::to_string(static_cast<long long int>(i));
#endif
}
out << " failed with the following message:\n"
<< message;
@ -690,7 +696,13 @@ bool Shader::compile(std::initializer_list<std::reference_wrapper<Shader>> shade
out.setFlag(Debug::SpaceAfterEachValue, false);
out << "Shader::compile(): compilation of " << shaderName(shader._type)
<< " shader";
if(shaders.size() != 1) out << ' ' << std::to_string(i);
if(shaders.size() != 1) {
#ifndef CORRADE_GCC44_COMPATIBILITY
out << ' ' << std::to_string(i);
#else
out << ' ' << std::to_string(static_cast<long long int>(i));
#endif
}
out << " succeeded with the following message:\n"
<< message;
}

Loading…
Cancel
Save