Browse Source

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.
pull/601/head
Vladimír Vondruš 3 years ago
parent
commit
34a91cf458
  1. 4
      doc/Doxyfile
  2. 2
      src/Magnum/Trade/SceneData.h

4
doc/Doxyfile

@ -2259,8 +2259,8 @@ PREDEFINED = DOXYGEN_GENERATING_OUTPUT \
CORRADE_DEPRECATED_FILE(message)= CORRADE_VISIBILITY_EXPORT= \ CORRADE_DEPRECATED_FILE(message)= CORRADE_VISIBILITY_EXPORT= \
CORRADE_VISIBILITY_LOCAL= CORRADE_VISIBILITY_IMPORT= \ CORRADE_VISIBILITY_LOCAL= CORRADE_VISIBILITY_IMPORT= \
CORRADE_IGNORE_DEPRECATED_PUSH= CORRADE_IGNORE_DEPRECATED_POP= \ CORRADE_IGNORE_DEPRECATED_PUSH= CORRADE_IGNORE_DEPRECATED_POP= \
CORRADE_ENUMSET_OPERATORS(message)= MAGNUM_BUILD_DEPRECATED \ CORRADE_ENUMSET_OPERATORS(message)= CORRADE_UNUSED= \
MAGNUM_TARGET_GL MAGNUM_TARGET_VK \ MAGNUM_BUILD_DEPRECATED MAGNUM_TARGET_GL MAGNUM_TARGET_VK \
MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DRAW_IMPLEMENTATION(type)= \ MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DRAW_IMPLEMENTATION(type)= \
MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DISPATCH_IMPLEMENTATION(type)= MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DISPATCH_IMPLEMENTATION(type)=

2
src/Magnum/Trade/SceneData.h

@ -4021,7 +4021,7 @@ template<class T, class U> constexpr SceneFieldData::SceneFieldData(const SceneF
/* Assumes that fieldDataBitOffset and fieldDataSize is already bounds-checked, /* Assumes that fieldDataBitOffset and fieldDataSize is already bounds-checked,
either by the StridedBitArrayView itself or by the offset-only constructor; either by the StridedBitArrayView itself or by the offset-only constructor;
and fieldArraySize as well by the constructor taking the 2D bit view */ and fieldArraySize as well by the constructor taking the 2D bit view */
constexpr SceneFieldData::SceneFieldData(const SceneField name, const SceneMappingType mappingType, const Containers::StridedArrayView1D<const void>& 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<const void>& 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, _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())}, "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), _name{(CORRADE_CONSTEXPR_ASSERT(Implementation::isSceneFieldTypeCompatibleWithField(name, SceneFieldType::Bit),

Loading…
Cancel
Save