Use osg::clone

coverity_scan^2
scrawl 8 years ago
parent 33d27a2285
commit c65492193c

@ -22,7 +22,7 @@ void overrideTexture(const std::string &texture, Resource::ResourceSystem *resou
osg::ref_ptr<osg::StateSet> stateset;
if (node->getStateSet())
stateset = static_cast<osg::StateSet*>(node->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
stateset = osg::clone(node->getStateSet(), osg::CopyOp::SHALLOW_COPY);
else
stateset = new osg::StateSet;

Loading…
Cancel
Save