1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Avoid redundant osg::ref_ptr<const BulletShape> copy

This commit is contained in:
elsid 2021-10-30 03:39:27 +02:00
parent ed5a4e195b
commit c83facd9d3
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -95,12 +95,12 @@ osg::ref_ptr<BulletShapeInstance> makeInstance(osg::ref_ptr<const BulletShape> s
}
BulletShapeInstance::BulletShapeInstance(osg::ref_ptr<const BulletShape> source)
: mSource(source)
: mSource(std::move(source))
{
mCollisionBox = source->mCollisionBox;
mAnimatedShapes = source->mAnimatedShapes;
mCollisionShape = duplicateCollisionShape(source->mCollisionShape.get());
mAvoidCollisionShape = duplicateCollisionShape(source->mAvoidCollisionShape.get());
mCollisionBox = mSource->mCollisionBox;
mAnimatedShapes = mSource->mAnimatedShapes;
mCollisionShape = duplicateCollisionShape(mSource->mCollisionShape.get());
mAvoidCollisionShape = duplicateCollisionShape(mSource->mAvoidCollisionShape.get());
}
}