1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +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);