Browse Source

Fix Shader::compile() error output.

Because Debug outputs chars as numbers, it displayed the following:

    compilation of fragment shader321 succeeded ...
    compilation of vertex shader322 succeeded ...

instead of

    compilation of fragment shader 1 succeeded ...
    compilation of vertex shader 2 succeeded ...

Now I will forever know that ASCII code of space is 32.
pull/54/head
Vladimír Vondruš 12 years ago
parent
commit
6eb9676604
  1. 8
      src/Magnum/Shader.cpp

8
src/Magnum/Shader.cpp

@ -677,9 +677,9 @@ bool Shader::compile(std::initializer_list<std::reference_wrapper<Shader>> shade
<< " shader";
if(shaders.size() != 1) {
#if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) && !defined(__MINGW32__)
out << ' ' << std::to_string(i);
out << " " << std::to_string(i);
#else
out << ' ' << converter.str();
out << " " << converter.str();
#endif
}
out << " failed with the following message:\n"
@ -694,9 +694,9 @@ bool Shader::compile(std::initializer_list<std::reference_wrapper<Shader>> shade
<< " shader";
if(shaders.size() != 1) {
#if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) && !defined(__MINGW32__)
out << ' ' << std::to_string(i);
out << " " << std::to_string(i);
#else
out << ' ' << converter.str();
out << " " << converter.str();
#endif
}
out << " succeeded with the following message:\n"

Loading…
Cancel
Save