1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00: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:
AnyOldName3 2020-08-20 03:01:43 +01:00
parent 707204133d
commit fd14dad789

View File

@ -2988,7 +2988,7 @@ osg::StateSet* MWShadowTechnique::selectStateSetForRenderingShadow(ViewDependent
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;
stateset->addUniform(uniform);