diff --git a/src/Magnum/Trade/AbstractSceneConverter.cpp b/src/Magnum/Trade/AbstractSceneConverter.cpp index 71ba441ef..b6217d95b 100644 --- a/src/Magnum/Trade/AbstractSceneConverter.cpp +++ b/src/Magnum/Trade/AbstractSceneConverter.cpp @@ -215,7 +215,7 @@ Debug& operator<<(Debug& debug, const SceneConverterFeature value) { /* LCOV_EXCL_STOP */ } - return debug << "(" << Debug::nospace << reinterpret_cast(UnsignedByte(value)) << Debug::nospace << ")"; + return debug << "(" << Debug::nospace << reinterpret_cast(UnsignedLong(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const SceneConverterFeatures value) { diff --git a/src/Magnum/Trade/AbstractSceneConverter.h b/src/Magnum/Trade/AbstractSceneConverter.h index fc97d946d..5b51dbf69 100644 --- a/src/Magnum/Trade/AbstractSceneConverter.h +++ b/src/Magnum/Trade/AbstractSceneConverter.h @@ -53,7 +53,7 @@ namespace Magnum { namespace Trade { @see @ref SceneConverterFeatures, @ref AbstractSceneConverter::features() */ -enum class SceneConverterFeature: UnsignedByte { +enum class SceneConverterFeature: UnsignedLong { /** * Convert a mesh with * @ref AbstractSceneConverter::convert(const MeshData&). diff --git a/src/Magnum/Trade/Test/AbstractSceneConverterTest.cpp b/src/Magnum/Trade/Test/AbstractSceneConverterTest.cpp index 093d149c4..31241c3b9 100644 --- a/src/Magnum/Trade/Test/AbstractSceneConverterTest.cpp +++ b/src/Magnum/Trade/Test/AbstractSceneConverterTest.cpp @@ -186,7 +186,7 @@ void AbstractSceneConverterTest::thingNotSupported() { struct: AbstractSceneConverter { SceneConverterFeatures doFeatures() const override { /* Assuming this bit is unused */ - return SceneConverterFeature(1 << 7); + return SceneConverterFeature(1ull << 63); } } converter; @@ -539,8 +539,16 @@ void AbstractSceneConverterTest::convertMeshToFileNotImplemented() { void AbstractSceneConverterTest::debugFeature() { std::ostringstream out; - Debug{&out} << SceneConverterFeature::ConvertMeshInPlace << SceneConverterFeature(0xf0); - CORRADE_COMPARE(out.str(), "Trade::SceneConverterFeature::ConvertMeshInPlace Trade::SceneConverterFeature(0xf0)\n"); + Debug{&out} << SceneConverterFeature::ConvertMeshInPlace << SceneConverterFeature(0xbafabafadeaddead); + { + #ifdef CORRADE_TARGET_32BIT + CORRADE_EXPECT_FAIL("Debug has shitty hex printing currently, using just the low 32 bits on 32-bit platforms."); + #endif + CORRADE_COMPARE(out.str(), "Trade::SceneConverterFeature::ConvertMeshInPlace Trade::SceneConverterFeature(0xbafabafadeaddead)\n"); + } + #ifdef CORRADE_TARGET_32BIT + CORRADE_COMPARE(out.str(), "Trade::SceneConverterFeature::ConvertMeshInPlace Trade::SceneConverterFeature(0xdeaddead)\n"); + #endif } void AbstractSceneConverterTest::debugFeatures() {