Browse Source

Trade: use the custom field/attribute helpers in debug printers.

Like, it's a *debug printer*, why an inline call would matter in there.
Or maybe it's that the debug printer was done way earlier than the
helpers? ... and then copied, without a brain attached to my head, from
MeshData to the new SceneData?
pull/554/head
Vladimír Vondruš 4 years ago
parent
commit
8c9c2b5ddb
  1. 4
      src/Magnum/Trade/MeshData.cpp
  2. 4
      src/Magnum/Trade/SceneData.cpp

4
src/Magnum/Trade/MeshData.cpp

@ -884,8 +884,8 @@ Debug& operator<<(Debug& debug, const MeshAttribute value) {
if(!packed)
debug << "Trade::MeshAttribute" << Debug::nospace;
if(UnsignedShort(value) >= UnsignedShort(MeshAttribute::Custom))
return debug << (packed ? "Custom(" : "::Custom(") << Debug::nospace << (UnsignedInt(value) - UnsignedInt(MeshAttribute::Custom)) << Debug::nospace << ")";
if(isMeshAttributeCustom(value))
return debug << (packed ? "Custom(" : "::Custom(") << Debug::nospace << meshAttributeCustom(value) << Debug::nospace << ")";
switch(value) {
/* LCOV_EXCL_START */

4
src/Magnum/Trade/SceneData.cpp

@ -112,8 +112,8 @@ Debug& operator<<(Debug& debug, const SceneField value) {
if(!packed)
debug << "Trade::SceneField" << Debug::nospace;
if(UnsignedInt(value) >= UnsignedInt(SceneField::Custom))
return debug << (packed ? "Custom(" : "::Custom(") << Debug::nospace << (UnsignedInt(value) - UnsignedInt(SceneField::Custom)) << Debug::nospace << ")";
if(isSceneFieldCustom(value))
return debug << (packed ? "Custom(" : "::Custom(") << Debug::nospace << sceneFieldCustom(value) << Debug::nospace << ")";
switch(value) {
/* LCOV_EXCL_START */

Loading…
Cancel
Save