Browse Source

Trade: skip these deprecation macros to silence Emscripten Clang 23.

It warns inside <type_traits> for some reason. Happens on Emscripten
5.0.2 all the way until latest 6.0.3, didn't happen on 5.0.1, and the
random Clang revision it's using isn't even released as a version 23 yet
so I can't tell if this is specific to Emscripten's filesystem layout or
is something that'll happen when building natively as well. So just omit
those few for now.
next
Vladimír Vondruš 4 weeks ago
parent
commit
862ae78d4b
  1. 11
      src/Magnum/Trade/MaterialData.h
  2. 11
      src/Magnum/Trade/ObjectData2D.h
  3. 11
      src/Magnum/Trade/ObjectData3D.h
  4. 11
      src/Magnum/Trade/PhongMaterialData.h

11
src/Magnum/Trade/MaterialData.h

@ -2031,7 +2031,16 @@ class MAGNUM_TRADE_EXPORT MaterialData {
* This enum is further extended in subclasses. * This enum is further extended in subclasses.
* @see @ref Flags, @ref flags() * @see @ref Flags, @ref flags()
*/ */
enum class CORRADE_DEPRECATED_ENUM("use hasAttribute() etc. instead") Flag: UnsignedInt { enum class
#if !defined(CORRADE_TARGET_EMSCRIPTEN) || __clang_major__ < 23
/* Clang 23 in Emscripten 5.0.2+ issues a deprecation warning inside
<type_traits> due to std::underlying_type used by EnumSet on this
enum. Not sure if it's because the STL headers are in ~/.cache or if
it's a general annoyance that'll happen with real Clang 23 as well,
for now just skipping the deprecation annotation to silence it. */
CORRADE_DEPRECATED_ENUM("use hasAttribute() etc. instead")
#endif
Flag: UnsignedInt {
/** /**
* The material is double-sided. Back faces should not be culled * The material is double-sided. Back faces should not be culled
* away but rendered as well, with normals flipped for correct * away but rendered as well, with normals flipped for correct

11
src/Magnum/Trade/ObjectData2D.h

@ -74,7 +74,16 @@ enum class CORRADE_DEPRECATED_ENUM("use SceneData instead") ObjectInstanceType2D
@see @ref ObjectFlags2D, @ref ObjectData2D::flags() @see @ref ObjectFlags2D, @ref ObjectData2D::flags()
*/ */
enum class CORRADE_DEPRECATED_ENUM("use SceneData instead") ObjectFlag2D: UnsignedByte { enum class
#if !defined(CORRADE_TARGET_EMSCRIPTEN) || __clang_major__ < 23
/* Clang 23 in Emscripten 5.0.2+ issues a deprecation warning inside
<type_traits> due to std::underlying_type used by EnumSet on this enum. Not
sure if it's because the STL headers are in ~/.cache or if it's a general
annoyance that'll happen with real Clang 23 as well, for now just skipping
the deprecation annotation to silence it. */
CORRADE_DEPRECATED_ENUM("use SceneData instead")
#endif
ObjectFlag2D: UnsignedByte {
/** /**
* The object provides separate translation / rotation / scaling * The object provides separate translation / rotation / scaling
* properties. The @ref ObjectData2D::transformation() matrix returns them * properties. The @ref ObjectData2D::transformation() matrix returns them

11
src/Magnum/Trade/ObjectData3D.h

@ -75,7 +75,16 @@ enum class CORRADE_DEPRECATED_ENUM("use SceneData instead") ObjectInstanceType3D
@see @ref ObjectFlags3D, @ref ObjectData3D::flags() @see @ref ObjectFlags3D, @ref ObjectData3D::flags()
*/ */
enum class CORRADE_DEPRECATED_ENUM("use SceneData instead") ObjectFlag3D: UnsignedByte { enum class
#if !defined(CORRADE_TARGET_EMSCRIPTEN) || __clang_major__ < 23
/* Clang 23 in Emscripten 5.0.2+ issues a deprecation warning inside
<type_traits> due to std::underlying_type used by EnumSet on this enum. Not
sure if it's because the STL headers are in ~/.cache or if it's a general
annoyance that'll happen with real Clang 23 as well, for now just skipping
the deprecation annotation to silence it. */
CORRADE_DEPRECATED_ENUM("use SceneData instead")
#endif
ObjectFlag3D: UnsignedByte {
/** /**
* The object provides separate translation / rotation / scaling * The object provides separate translation / rotation / scaling
* properties. The @ref ObjectData3D::transformation() matrix returns them * properties. The @ref ObjectData3D::transformation() matrix returns them

11
src/Magnum/Trade/PhongMaterialData.h

@ -58,7 +58,16 @@ class MAGNUM_TRADE_EXPORT PhongMaterialData: public MaterialData {
* A superset of @ref MaterialData::Flag. * A superset of @ref MaterialData::Flag.
* @see @ref Flags, @ref flags() * @see @ref Flags, @ref flags()
*/ */
enum class CORRADE_DEPRECATED_ENUM("use hasAttribute() etc. instead") Flag: UnsignedInt { enum class
#if !defined(CORRADE_TARGET_EMSCRIPTEN) || __clang_major__ < 23
/* Clang 23 in Emscripten 5.0.2+ issues a deprecation warning inside
<type_traits> due to std::underlying_type used by EnumSet on this
enum. Not sure if it's because the STL headers are in ~/.cache or if
it's a general annoyance that'll happen with real Clang 23 as well,
for now just skipping the deprecation annotation to silence it. */
CORRADE_DEPRECATED_ENUM("use hasAttribute() etc. instead")
#endif
Flag: UnsignedInt {
/** @copydoc MaterialData::Flag::DoubleSided */ /** @copydoc MaterialData::Flag::DoubleSided */
DoubleSided = 1 << 0, DoubleSided = 1 << 0,

Loading…
Cancel
Save