From 0c6d72b2d186650d19b09159b10b78cdcdf89431 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 6 Mar 2021 01:50:58 +0100 Subject: [PATCH] Consider first set element as first acquired --- components/detournavigator/navmeshtilescache.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/detournavigator/navmeshtilescache.cpp b/components/detournavigator/navmeshtilescache.cpp index 8dc554d79..ccc41a666 100644 --- a/components/detournavigator/navmeshtilescache.cpp +++ b/components/detournavigator/navmeshtilescache.cpp @@ -74,10 +74,9 @@ namespace DetourNavigator } iterator->mNavMeshData = std::move(value); + ++iterator->mUseCount; mUsedNavMeshDataSize += itemSize; - mFreeNavMeshDataSize += itemSize; - - acquireItemUnsafe(iterator); + mBusyItems.splice(mBusyItems.end(), mFreeItems, iterator); return Value(*this, iterator); }