Avoid redundant osg::ref_ptr<const BulletShape> copy

pull/3212/head
elsid 3 years ago
parent ed5a4e195b
commit c83facd9d3
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -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());
}
}

Loading…
Cancel
Save