From 186629b37282d880ad059516c7a3673844b74ac9 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 8 May 2017 21:57:08 +0200 Subject: [PATCH] SpatialSort: use std::vector::resize( 0 ) to improve readability. --- code/SpatialSort.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/SpatialSort.cpp b/code/SpatialSort.cpp index 3825dc33a..a350c07e2 100644 --- a/code/SpatialSort.cpp +++ b/code/SpatialSort.cpp @@ -269,7 +269,7 @@ void SpatialSort::FindIdenticalPositions( const aiVector3D& pPosition, // 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()); + poResults.resize( 0 ); // do a binary search for the minimal distance to start the iteration there unsigned int index = (unsigned int)mPositions.size() / 2;