From 1a995ae68f72836e529e0257dccc96eb12a9f3ec Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 3 Jul 2021 17:39:34 +0200 Subject: [PATCH] Shrink to fit recast mesh data --- components/detournavigator/recastmesh.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/detournavigator/recastmesh.cpp b/components/detournavigator/recastmesh.cpp index 1a9982402..00d6ae556 100644 --- a/components/detournavigator/recastmesh.cpp +++ b/components/detournavigator/recastmesh.cpp @@ -19,5 +19,9 @@ namespace DetourNavigator + std::to_string(getTrianglesCount()) + ", areaTypes=" + std::to_string(mAreaTypes.size())); if (getVerticesCount()) rcCalcBounds(mVertices.data(), static_cast(getVerticesCount()), mBounds.mMin.ptr(), mBounds.mMax.ptr()); + mIndices.shrink_to_fit(); + mVertices.shrink_to_fit(); + mAreaTypes.shrink_to_fit(); + mWater.shrink_to_fit(); } }