1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-04 04:45:33 +00:00

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
This commit is contained in:
elsid 2019-11-17 17:02:35 +01:00
parent b07a6afa91
commit cf01df31be
No known key found for this signature in database
GPG key ID: D27B8E8D10A2896B

View file

@ -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));