mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 15:06:41 +00:00
Merge branch 'navmeshtilescache_find' into 'master'
Avoid redundant copy when finding item in NavMeshTilesCache See merge request OpenMW/openmw!2109
This commit is contained in:
commit
510a9b9a5e
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ namespace DetourNavigator
|
||||||
|
|
||||||
++mGetCount;
|
++mGetCount;
|
||||||
|
|
||||||
const auto tile = mValues.find(std::make_tuple(agentBounds, changedTile, recastMesh));
|
const auto tile = mValues.find(std::tie(agentBounds, changedTile, recastMesh));
|
||||||
if (tile == mValues.end())
|
if (tile == mValues.end())
|
||||||
return Value();
|
return Value();
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ namespace DetourNavigator
|
||||||
{
|
{
|
||||||
const auto& item = mFreeItems.back();
|
const auto& item = mFreeItems.back();
|
||||||
|
|
||||||
const auto value = mValues.find(std::make_tuple(item.mAgentBounds, item.mChangedTile, std::cref(item.mRecastMeshData)));
|
const auto value = mValues.find(std::tie(item.mAgentBounds, item.mChangedTile, item.mRecastMeshData));
|
||||||
if (value == mValues.end())
|
if (value == mValues.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue