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

Loading…
Cancel
Save