mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 12:53:53 +00:00
Join variables declaration and usage
This commit is contained in:
parent
5f6f2c15b1
commit
e309f75938
1 changed files with 2 additions and 4 deletions
|
@ -278,8 +278,7 @@ namespace Shader
|
||||||
|
|
||||||
const osg::StateSet::AttributeList& attributes = stateset->getAttributeList();
|
const osg::StateSet::AttributeList& attributes = stateset->getAttributeList();
|
||||||
osg::StateSet::AttributeList removedAttributes;
|
osg::StateSet::AttributeList removedAttributes;
|
||||||
osg::ref_ptr<osg::StateSet> removedState;
|
if (osg::ref_ptr<osg::StateSet> removedState = getRemovedState(*stateset))
|
||||||
if (removedState = getRemovedState(*stateset))
|
|
||||||
removedAttributes = removedState->getAttributeList();
|
removedAttributes = removedState->getAttributeList();
|
||||||
for (const auto& attributeMap : { attributes, removedAttributes })
|
for (const auto& attributeMap : { attributes, removedAttributes })
|
||||||
{
|
{
|
||||||
|
@ -475,8 +474,7 @@ namespace Shader
|
||||||
|
|
||||||
writableStateSet->removeAttribute(osg::StateAttribute::PROGRAM);
|
writableStateSet->removeAttribute(osg::StateAttribute::PROGRAM);
|
||||||
|
|
||||||
osg::ref_ptr<osg::StateSet> removedState;
|
if (osg::ref_ptr<osg::StateSet> removedState = getRemovedState(*writableStateSet))
|
||||||
if (removedState = getRemovedState(*writableStateSet))
|
|
||||||
{
|
{
|
||||||
// user data is normally shallow copied so shared with the original stateset
|
// user data is normally shallow copied so shared with the original stateset
|
||||||
osg::ref_ptr<osg::UserDataContainer> writableUserData;
|
osg::ref_ptr<osg::UserDataContainer> writableUserData;
|
||||||
|
|
Loading…
Reference in a new issue