From b77684a135be4c554636bfc8af7965bffe99ebc6 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 3 Nov 2018 16:13:46 +0300 Subject: [PATCH] Add TODOs --- components/detournavigator/navmeshtilescache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/detournavigator/navmeshtilescache.cpp b/components/detournavigator/navmeshtilescache.cpp index fa0af22210..4848314935 100644 --- a/components/detournavigator/navmeshtilescache.cpp +++ b/components/detournavigator/navmeshtilescache.cpp @@ -63,6 +63,7 @@ namespace DetourNavigator if (tileValues == agentValues->second.end()) return Value(); + // TODO: use different function to make key to avoid unnecessary std::string allocation const auto tile = tileValues->second.find(makeNavMeshKey(recastMesh, offMeshConnections)); if (tile == tileValues->second.end()) return Value(); @@ -96,6 +97,7 @@ namespace DetourNavigator removeLeastRecentlyUsed(); 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); if (!emplaced.second)