mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-04 13:45:32 +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:
parent
b07a6afa91
commit
cf01df31be
1 changed files with 1 additions and 3 deletions
|
@ -515,13 +515,11 @@ namespace MWRender
|
||||||
protected:
|
protected:
|
||||||
virtual void setDefaults(osg::StateSet* stateset)
|
virtual void setDefaults(osg::StateSet* stateset)
|
||||||
{
|
{
|
||||||
osg::Material* material = static_cast<osg::Material*>(stateset->getAttribute(osg::StateAttribute::MATERIAL));
|
|
||||||
|
|
||||||
osg::BlendFunc* blendfunc (new osg::BlendFunc);
|
osg::BlendFunc* blendfunc (new osg::BlendFunc);
|
||||||
stateset->setAttributeAndModes(blendfunc, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
|
stateset->setAttributeAndModes(blendfunc, osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
|
||||||
|
|
||||||
// FIXME: overriding diffuse/ambient/emissive colors
|
// FIXME: overriding diffuse/ambient/emissive colors
|
||||||
material = new osg::Material;
|
osg::Material* material = new osg::Material;
|
||||||
material->setColorMode(osg::Material::OFF);
|
material->setColorMode(osg::Material::OFF);
|
||||||
material->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,mAlpha));
|
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));
|
material->setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4f(1,1,1,1));
|
||||||
|
|
Loading…
Reference in a new issue