Browse Source

Platform: using std::string::data() to print it is an antipattern.

No, just no.
pull/240/head
Vladimír Vondruš 5 years ago
parent
commit
0148a1e80f
  1. 4
      src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp

4
src/Magnum/Platform/Test/EmscriptenApplicationTest.cpp

@ -124,9 +124,9 @@ struct EmscriptenApplicationTest: Platform::Application {
{
Debug d;
if(event.key() != KeyEvent::Key::Unknown) {
d << "keyReleaseEvent(" << Debug::nospace << event.keyName().data() << Debug::nospace << "): ✔";
d << "keyReleaseEvent(" << Debug::nospace << event.keyName() << Debug::nospace << "): ✔";
} else {
d << "keyReleaseEvent(" << Debug::nospace << event.keyName().data() << Debug::nospace << "): ✘";
d << "keyReleaseEvent(" << Debug::nospace << event.keyName() << Debug::nospace << "): ✘";
}
if(event.modifiers() & KeyEvent::Modifier::Shift) d << "Shift";

Loading…
Cancel
Save