aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <anton@korobeynikov.info>2018-09-27 14:09:32 +0000
committerAnton Korobeynikov <anton@korobeynikov.info>2018-09-27 14:09:32 +0000
commit08916e31d1db67cfe5d83ecc6fd1f1aa5b48332b (patch)
tree7f9c606defe519782ea1a93201e18f384bb6b5d2
parent3274e5c518d687ad2b5574573d5484241212f440 (diff)
More fixes for UBs in Bullet
git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@343219 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
index eda45c47..e78e420a 100644
--- a/MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
+++ b/MultiSource/Benchmarks/Bullet/include/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
@@ -195,7 +195,7 @@ private:
// This assumes proxyId1 and proxyId2 are 16-bit.
SIMD_FORCE_INLINE int getHash(int proxyId1, int proxyId2)
{
- int key = (proxyId2 << 16) | proxyId1;
+ unsigned int key = (proxyId2 << 16) | proxyId1;
key = ~key + (key << 15);
key = key ^ (key >> 12);
key = key + (key << 2);
@@ -210,7 +210,7 @@ private:
SIMD_FORCE_INLINE unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2)
{
- int key = static_cast<int>(((unsigned int)proxyId1) | (((unsigned int)proxyId2) <<16));
+ unsigned int key = static_cast<int>(((unsigned int)proxyId1) | (((unsigned int)proxyId2) <<16));
// Thomas Wang's hash
key += ~(key << 15);