Browse Source

Workaround for compile error in clang 13 on macOS (#1485)

Fixes #1482
Jorrit Rouwe 6 months ago
parent
commit
294c22850c
3 changed files with 3 additions and 3 deletions
  1. 1 1
      Jolt/Core/Color.h
  2. 1 1
      Jolt/Geometry/OrientedBox.h
  3. 1 1
      Jolt/Physics/Body/Body.h

+ 1 - 1
Jolt/Core/Color.h

@@ -12,7 +12,7 @@ class Color;
 using ColorArg = Color;
 using ColorArg = Color;
 
 
 /// Class that holds an RGBA color with 8-bits per component
 /// Class that holds an RGBA color with 8-bits per component
-class [[nodiscard]] JPH_EXPORT_GCC_BUG_WORKAROUND Color
+class JPH_EXPORT_GCC_BUG_WORKAROUND [[nodiscard]] Color
 {
 {
 public:
 public:
 	/// Constructors
 	/// Constructors

+ 1 - 1
Jolt/Geometry/OrientedBox.h

@@ -14,7 +14,7 @@ JPH_NAMESPACE_BEGIN
 class AABox;
 class AABox;
 
 
 /// Oriented box
 /// Oriented box
-class [[nodiscard]] JPH_EXPORT_GCC_BUG_WORKAROUND OrientedBox
+class JPH_EXPORT_GCC_BUG_WORKAROUND [[nodiscard]] OrientedBox
 {
 {
 public:
 public:
 	JPH_OVERRIDE_NEW_DELETE
 	JPH_OVERRIDE_NEW_DELETE

+ 1 - 1
Jolt/Physics/Body/Body.h

@@ -31,7 +31,7 @@ class SoftBodyCreationSettings;
 /// The functions that get/set the position of the body all indicate if they are relative to the center of mass or to the original position in which the shape was created.
 /// The functions that get/set the position of the body all indicate if they are relative to the center of mass or to the original position in which the shape was created.
 ///
 ///
 /// The linear velocity is also velocity of the center of mass, to correct for this: \f$VelocityCOM = Velocity - AngularVelocity \times ShapeCOM\f$.
 /// The linear velocity is also velocity of the center of mass, to correct for this: \f$VelocityCOM = Velocity - AngularVelocity \times ShapeCOM\f$.
-class alignas(JPH_RVECTOR_ALIGNMENT) JPH_EXPORT_GCC_BUG_WORKAROUND Body : public NonCopyable
+class JPH_EXPORT_GCC_BUG_WORKAROUND alignas(JPH_RVECTOR_ALIGNMENT) Body : public NonCopyable
 {
 {
 public:
 public:
 	JPH_OVERRIDE_NEW_DELETE
 	JPH_OVERRIDE_NEW_DELETE