Browse Source

SpatialSort: use much easier reabability.

Kim Kulling 8 years ago
parent
commit
19d59b630b
1 changed files with 2 additions and 3 deletions
  1. 2 3
      code/SpatialSort.cpp

+ 2 - 3
code/SpatialSort.cpp

@@ -126,9 +126,8 @@ void SpatialSort::FindPositions( const aiVector3D& pPosition,
     const ai_real dist = pPosition * mPlaneNormal;
     const ai_real dist = pPosition * mPlaneNormal;
     const ai_real minDist = dist - pRadius, maxDist = dist + pRadius;
     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
     // quick check for positions outside the range
     if( mPositions.size() == 0)
     if( mPositions.size() == 0)