mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-09 12:25:17 -04:00
const osg::ref_ptf reference should be faster than value as constructor and destructor are non-trivial
I played around in GodBolt and got into an argument to determine this. The difference will be immeasurably small, but my curiosity has been satisfied.
This commit is contained in:
parent
707204133d
commit
fd14dad789
@ -2988,7 +2988,7 @@ osg::StateSet* MWShadowTechnique::selectStateSetForRenderingShadow(ViewDependent
|
|||||||
|
|
||||||
stateset->setTextureAttributeAndModes(0, _fallbackBaseTexture.get(), osg::StateAttribute::ON);
|
stateset->setTextureAttributeAndModes(0, _fallbackBaseTexture.get(), osg::StateAttribute::ON);
|
||||||
|
|
||||||
for(auto uniform : _uniforms[traversalNumber % 2])
|
for(const auto& uniform : _uniforms[traversalNumber % 2])
|
||||||
{
|
{
|
||||||
OSG_INFO<<"addUniform("<<uniform->getName()<<")"<<std::endl;
|
OSG_INFO<<"addUniform("<<uniform->getName()<<")"<<std::endl;
|
||||||
stateset->addUniform(uniform);
|
stateset->addUniform(uniform);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user