1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-01 22:41:31 +00:00

Move key when inserting item to mLODNameCache

This commit is contained in:
elsid 2024-05-05 14:02:11 +02:00
parent 6e3fd34790
commit 2169e22e93
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -664,13 +664,11 @@ namespace MWRender
if (found != mLODNameCache.end() && found->first == key)
model = found->second;
else
model
= mLODNameCache
.insert(found,
{ key,
Misc::ResourceHelpers::getLODMeshName(world.getESMVersions()[refNum.mContentFile],
model, mSceneManager->getVFS(), lod) })
->second;
model = mLODNameCache
.emplace_hint(found, std::move(key),
Misc::ResourceHelpers::getLODMeshName(world.getESMVersions()[refNum.mContentFile],
model, mSceneManager->getVFS(), lod))
->second;
}
osg::ref_ptr<const osg::Node> cnode = mSceneManager->getTemplate(model, false);