Various code fixes and tweaks

This commit is contained in:
Wojtek Figat
2023-07-02 15:46:29 +02:00
parent 0d7e7edf80
commit 04963fef18
13 changed files with 26 additions and 24 deletions

View File

@@ -298,7 +298,7 @@ PX_FORCE_INLINE bool isFiniteQuatV(const QuatV q)
return isFiniteVec4V(q);
}
#if PX_CLANG
#if PX_CLANG && __clang_major__ >= 12
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical" // bitwise intentionally chosen for performance
#endif
@@ -319,7 +319,7 @@ PX_FORCE_INLINE bool isSaneQuatV(const QuatV q)
return isFiniteVec4V(q) & (BAllEqTTTT(con) == 1);
}
#if PX_CLANG
#if PX_CLANG && __clang_major__ >= 12
#pragma clang diagnostic pop
#endif

View File

@@ -122,7 +122,7 @@ class PxTransformV
return PxTransformV(V3Add(QuatRotate(q, src.p), p), QuatMul(q, src.q));
}
#if PX_CLANG
#if PX_CLANG && __clang_major__ >= 12
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical" // bitwise intentionally chosen for performance
#endif
@@ -156,7 +156,7 @@ class PxTransformV
return isFiniteVec3V(p) & isFiniteQuatV(q);
}
#if PX_CLANG
#if PX_CLANG && __clang_major__ >= 12
#pragma clang diagnostic pop
#endif

View File

@@ -58,7 +58,6 @@ Return the index of the highest set bit. Undefined for zero arg.
*/
PX_INLINE uint32_t PxHighestSetBitUnsafe(uint32_t v)
{
return uint32_t(31 - __builtin_clz(v));
}