diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 3e67fbb3c..309dac88b 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -1110,7 +1110,7 @@ namespace NifOsg geometry->setDataVariance(osg::Object::STATIC); osg::ref_ptr frameswitch = new FrameSwitch; - osg::ref_ptr geom2 = static_cast(osg::clone(geometry.get(), osg::CopyOp::DEEP_COPY_NODES|osg::CopyOp::DEEP_COPY_DRAWABLES)); + osg::ref_ptr 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 = new FrameSwitch; - SceneUtil::RigGeometry* rig2 = static_cast(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); diff --git a/components/sceneutil/statesetupdater.cpp b/components/sceneutil/statesetupdater.cpp index 0e325082e..31d42d342 100644 --- a/components/sceneutil/statesetupdater.cpp +++ b/components/sceneutil/statesetupdater.cpp @@ -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::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(osg::clone(copy.mCtrls[i].get(), copyop))); + mCtrls.push_back(osg::clone(copy.mCtrls[i].get(), copyop)); } unsigned int CompositeStateSetUpdater::getNumControllers()