1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-04-01 13:36:42 +00:00

Add TODOs

This commit is contained in:
elsid 2018-11-03 16:13:46 +03:00
parent 2ba026e2b2
commit b77684a135
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40

View file

@ -63,6 +63,7 @@ namespace DetourNavigator
if (tileValues == agentValues->second.end()) if (tileValues == agentValues->second.end())
return Value(); return Value();
// TODO: use different function to make key to avoid unnecessary std::string allocation
const auto tile = tileValues->second.find(makeNavMeshKey(recastMesh, offMeshConnections)); const auto tile = tileValues->second.find(makeNavMeshKey(recastMesh, offMeshConnections));
if (tile == tileValues->second.end()) if (tile == tileValues->second.end())
return Value(); return Value();
@ -96,6 +97,7 @@ namespace DetourNavigator
removeLeastRecentlyUsed(); removeLeastRecentlyUsed();
const auto iterator = mFreeItems.emplace(mFreeItems.end(), agentHalfExtents, changedTile, navMeshKey); const auto iterator = mFreeItems.emplace(mFreeItems.end(), agentHalfExtents, changedTile, navMeshKey);
// TODO: use std::string_view or some alternative to avoid navMeshKey copy into both mFreeItems and mValues
const auto emplaced = mValues[agentHalfExtents][changedTile].emplace(navMeshKey, iterator); const auto emplaced = mValues[agentHalfExtents][changedTile].emplace(navMeshKey, iterator);
if (!emplaced.second) if (!emplaced.second)