From 34a91cf4580babf94497cdf2acfe45bd8432cde3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 23 Feb 2023 14:03:32 +0100 Subject: [PATCH] Trade: fix an unused variable warning on a no-assert build. And add CORRADE_UNUSED to the list of macros that Doxygen should ignore, as it otherwise complains that the function has no matching prototype. --- doc/Doxyfile | 4 ++-- src/Magnum/Trade/SceneData.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Doxyfile b/doc/Doxyfile index e52934b54..3a631d1ff 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -2259,8 +2259,8 @@ PREDEFINED = DOXYGEN_GENERATING_OUTPUT \ CORRADE_DEPRECATED_FILE(message)= CORRADE_VISIBILITY_EXPORT= \ CORRADE_VISIBILITY_LOCAL= CORRADE_VISIBILITY_IMPORT= \ CORRADE_IGNORE_DEPRECATED_PUSH= CORRADE_IGNORE_DEPRECATED_POP= \ - CORRADE_ENUMSET_OPERATORS(message)= MAGNUM_BUILD_DEPRECATED \ - MAGNUM_TARGET_GL MAGNUM_TARGET_VK \ + CORRADE_ENUMSET_OPERATORS(message)= CORRADE_UNUSED= \ + MAGNUM_BUILD_DEPRECATED MAGNUM_TARGET_GL MAGNUM_TARGET_VK \ MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DRAW_IMPLEMENTATION(type)= \ MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DISPATCH_IMPLEMENTATION(type)= diff --git a/src/Magnum/Trade/SceneData.h b/src/Magnum/Trade/SceneData.h index e17dec2e7..ac543da9f 100644 --- a/src/Magnum/Trade/SceneData.h +++ b/src/Magnum/Trade/SceneData.h @@ -4021,7 +4021,7 @@ template constexpr SceneFieldData::SceneFieldData(const SceneF /* Assumes that fieldDataBitOffset and fieldDataSize is already bounds-checked, either by the StridedBitArrayView itself or by the offset-only constructor; and fieldArraySize as well by the constructor taking the 2D bit view */ -constexpr SceneFieldData::SceneFieldData(const SceneField name, const SceneMappingType mappingType, const Containers::StridedArrayView1D& mappingData, const void* const fieldData, const UnsignedByte fieldBitOffset, const std::size_t fieldSize, const std::ptrdiff_t fieldStride, const UnsignedShort fieldArraySize, const SceneFieldFlags flags) noexcept: +constexpr SceneFieldData::SceneFieldData(const SceneField name, const SceneMappingType mappingType, const Containers::StridedArrayView1D& mappingData, const void* const fieldData, const UnsignedByte fieldBitOffset, CORRADE_UNUSED const std::size_t fieldSize, const std::ptrdiff_t fieldStride, const UnsignedShort fieldArraySize, const SceneFieldFlags flags) noexcept: _size{(CORRADE_CONSTEXPR_ASSERT(mappingData.size() == fieldSize, "Trade::SceneFieldData: expected" << name << "mapping and field view to have the same size but got" << mappingData.size() << "and" << fieldSize), mappingData.size())}, _name{(CORRADE_CONSTEXPR_ASSERT(Implementation::isSceneFieldTypeCompatibleWithField(name, SceneFieldType::Bit),