Remove unused variable initialization

/home/elsid/dev/openmw/apps/openmw/mwrender/animation.cpp:518:28: warning: Value stored to 'material' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
            osg::Material* material = static_cast<osg::Material*>(stateset->getAttribute(osg::StateAttribute::MATERIAL));
                           ^
/home/elsid/dev/openmw/apps/openmw/mwrender/animation.cpp:518:28: note: Value stored to 'material' during its initialization is never read
pull/2602/head
elsid 5 years ago
parent b07a6afa91
commit cf01df31be
No known key found for this signature in database
GPG Key ID: D27B8E8D10A2896B

@ -515,13 +515,11 @@ namespace MWRender
protected:
virtual void setDefaults(osg::StateSet* stateset)
{
osg::Material* material = static_cast<osg::Material*>(stateset->getAttribute(osg::StateAttribute::MATERIAL));
osg::BlendFunc* blendfunc (new osg::BlendFunc);
stateset->setAttributeAndModes(blendfunc, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
// FIXME: overriding diffuse/ambient/emissive colors
material = new osg::Material;
osg::Material* material = new osg::Material;
material->setColorMode(osg::Material::OFF);
material->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,mAlpha));
material->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,1));

Loading…
Cancel
Save