avoid unecessary branch

This commit is contained in:
Andrew Meadows 2016-09-16 14:50:08 -07:00
parent 61a05eb4d1
commit 49224d9698

View file

@ -204,13 +204,9 @@ bool CharacterGhostObject::sweepTest(
CharacterSweepResult& result) const { CharacterSweepResult& result) const {
if (_world && _inWorld) { if (_world && _inWorld) {
assert(shape); assert(shape);
btScalar allowedPenetration = _world->getDispatchInfo().m_allowedCcdPenetration; btScalar allowedPenetration = _world->getDispatchInfo().m_allowedCcdPenetration;
convexSweepTest(shape, start, end, result, allowedPenetration); convexSweepTest(shape, start, end, result, allowedPenetration);
return result.hasHit();
if (result.hasHit()) {
return true;
}
} }
return false; return false;
} }