Skip to content

Commit

Permalink
Re-adding sorting in NNGrid construction
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed May 16, 2012
1 parent 56c81dd commit 0d0a27d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DataStructures/NNGrid.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ class NNGrid {
}

unsigned FlushEntriesWithSameFileIndexToBuffer( std::vector<GridEntry> &vectorWithSameFileIndex, std::vector<char> & tmpBuffer, const unsigned long index) {
sort( vectorWithSameFileIndex.begin(), vectorWithSameFileIndex.end() );
vectorWithSameFileIndex.erase(unique(vectorWithSameFileIndex.begin(), vectorWithSameFileIndex.end()), vectorWithSameFileIndex.end());
const unsigned lengthOfBucket = vectorWithSameFileIndex.size();
tmpBuffer.resize(tmpBuffer.size()+(sizeof(_GridEdge)*lengthOfBucket) + sizeof(unsigned) );
unsigned counter = 0;
Expand Down

0 comments on commit 0d0a27d

Please sign in to comment.