From 9be56213e05bbbc545107373259ebe9615265bc0 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Wed, 14 Oct 2020 18:30:21 +0200 Subject: [PATCH] Optimization in NarrowPhaseInfoBatch --- src/collision/narrowphase/NarrowPhaseInfoBatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collision/narrowphase/NarrowPhaseInfoBatch.cpp b/src/collision/narrowphase/NarrowPhaseInfoBatch.cpp index ea08cf5b..9109dd64 100644 --- a/src/collision/narrowphase/NarrowPhaseInfoBatch.cpp +++ b/src/collision/narrowphase/NarrowPhaseInfoBatch.cpp @@ -76,7 +76,7 @@ void NarrowPhaseInfoBatch::clear() { // allocated in the next frame at a possibly different location in memory (remember that the // location of the allocated memory of a single frame allocator might change between two frames) - mCachedCapacity = narrowPhaseInfos.size(); + mCachedCapacity = narrowPhaseInfos.capacity(); narrowPhaseInfos.clear(true); }