Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2012-04-24 09:28:19 +0400
committerErwin Coumans <blender@erwincoumans.com>2012-04-24 09:28:19 +0400
commit782cf3f844e99988298a401e9295cdcdb55fc95f (patch)
tree2b3ae174e3cab23adecf45dd9a0c9ee5bb409ac3 /extern
parentf02694f5a480c2c0f9cd695075da4eacebd18666 (diff)
Peer pressure :) Fix some very public (but probably harmless) errors in extern/bullet2, it will propagate to the Bullet soon from here:
https://www.assembla.com/code/bullet3/subversion/nodes Thanks to Campbell for letting me know Fixed described by Sean here: http://stackoverflow.com/questions/818535/how-can-i-set-all-bits-to-1-in-a-binary-number-of-an-unknown-size
Diffstat (limited to 'extern')
-rw-r--r--extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h4
-rw-r--r--extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
index aa30d43a025..51b27afe686 100644
--- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
+++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
@@ -78,8 +78,10 @@ ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode
int getTriangleIndex() const
{
btAssert(isLeafNode());
+ unsigned int x=0;
+ unsigned int y = (~(x&0))<<(31-MAX_NUM_PARTS_IN_BITS);
// Get only the lower bits where the triangle index is stored
- return (m_escapeIndexOrTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
+ return (m_escapeIndexOrTriangleIndex&~(y));
}
int getPartId() const
{
diff --git a/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h b/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
index a6ea33717bc..f311419d4a8 100644
--- a/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
+++ b/extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
@@ -45,7 +45,9 @@ struct btTriIndex
int getTriangleIndex() const
{
// Get only the lower bits where the triangle index is stored
- return (m_PartIdTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
+ unsigned int x = 0;
+ unsigned int y = (~(x&0))<<(31-MAX_NUM_PARTS_IN_BITS);
+ return (m_PartIdTriangleIndex&~(y));
}
int getPartId() const
{