mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:15:36 +00:00
Avoid copy and deep equality check
This commit is contained in:
parent
8a1b4bde8a
commit
0e122b1e3d
1 changed files with 3 additions and 3 deletions
|
@ -275,11 +275,11 @@ namespace Shader
|
|||
osg::StateSet::AttributeList removedAttributes;
|
||||
if (osg::ref_ptr<osg::StateSet> removedState = getRemovedState(*stateset))
|
||||
removedAttributes = removedState->getAttributeList();
|
||||
for (const auto& attributeMap : { attributes, removedAttributes })
|
||||
for (const auto* attributeMap : std::initializer_list<const osg::StateSet::AttributeList*>{ &attributes, &removedAttributes })
|
||||
{
|
||||
for (osg::StateSet::AttributeList::const_iterator it = attributeMap.begin(); it != attributeMap.end(); ++it)
|
||||
for (osg::StateSet::AttributeList::const_iterator it = attributeMap->begin(); it != attributeMap->end(); ++it)
|
||||
{
|
||||
if (attributeMap != removedAttributes && removedAttributes.count(it->first))
|
||||
if (attributeMap != &removedAttributes && removedAttributes.count(it->first))
|
||||
continue;
|
||||
if (it->first.first == osg::StateAttribute::MATERIAL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue