From 19d59b630b28793d272b5a80195f1b24e2cd135e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 6 Jun 2017 11:37:02 +0200 Subject: [PATCH] SpatialSort: use much easier reabability. --- code/SpatialSort.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/SpatialSort.cpp b/code/SpatialSort.cpp index fa78d8bb6..35724c2cd 100644 --- a/code/SpatialSort.cpp +++ b/code/SpatialSort.cpp @@ -126,9 +126,8 @@ void SpatialSort::FindPositions( const aiVector3D& pPosition, const ai_real dist = pPosition * mPlaneNormal; const ai_real minDist = dist - pRadius, maxDist = dist + pRadius; - // clear the array in this strange fashion because a simple clear() would also deallocate - // the array which we want to avoid - poResults.erase( poResults.begin(), poResults.end()); + // clear the array + poResults.clear(); // quick check for positions outside the range if( mPositions.size() == 0)