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:
parent
ed5a4e195b
commit
c83facd9d3
@ -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…
Reference in New Issue
Block a user