Remove unneeded casts

pull/35/head
scrawl 8 years ago
parent 30b549124e
commit 513e1da8a3

@ -1110,7 +1110,7 @@ namespace NifOsg
geometry->setDataVariance(osg::Object::STATIC);
osg::ref_ptr<FrameSwitch> frameswitch = new FrameSwitch;
osg::ref_ptr<osg::Geometry> geom2 = static_cast<osg::Geometry*>(osg::clone(geometry.get(), osg::CopyOp::DEEP_COPY_NODES|osg::CopyOp::DEEP_COPY_DRAWABLES));
osg::ref_ptr<osg::Geometry> geom2 = osg::clone(geometry.get(), osg::CopyOp::DEEP_COPY_NODES|osg::CopyOp::DEEP_COPY_DRAWABLES);
frameswitch->addChild(geometry);
frameswitch->addChild(geom2);
@ -1224,8 +1224,7 @@ namespace NifOsg
osg::ref_ptr<FrameSwitch> frameswitch = new FrameSwitch;
SceneUtil::RigGeometry* rig2 = static_cast<SceneUtil::RigGeometry*>(osg::clone(rig.get(), osg::CopyOp::DEEP_COPY_NODES|
osg::CopyOp::DEEP_COPY_DRAWABLES));
SceneUtil::RigGeometry* rig2 = osg::clone(rig.get(), osg::CopyOp::DEEP_COPY_NODES|osg::CopyOp::DEEP_COPY_DRAWABLES);
frameswitch->addChild(rig);
frameswitch->addChild(rig2);

@ -15,7 +15,7 @@ namespace SceneUtil
for (int i=0; i<2; ++i) // Using SHALLOW_COPY for StateAttributes, if users want to modify it is their responsibility to set a non-shared one first
// This can be done conveniently in user implementations of the setDefaults() method
{
mStateSets[i] = static_cast<osg::StateSet*>(osg::clone(src, osg::CopyOp::SHALLOW_COPY));
mStateSets[i] = osg::clone(src, osg::CopyOp::SHALLOW_COPY);
setDefaults(mStateSets[i]);
}
}
@ -65,7 +65,7 @@ namespace SceneUtil
: StateSetUpdater(copy, copyop)
{
for (unsigned int i=0; i<copy.mCtrls.size(); ++i)
mCtrls.push_back(static_cast<StateSetUpdater*>(osg::clone(copy.mCtrls[i].get(), copyop)));
mCtrls.push_back(osg::clone(copy.mCtrls[i].get(), copyop));
}
unsigned int CompositeStateSetUpdater::getNumControllers()

Loading…
Cancel
Save