diff options
author | Chris Want <cwant@ualberta.ca> | 2002-12-26 00:42:56 +0300 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2002-12-26 00:42:56 +0300 |
commit | 331fffaecb45371875d60f015da24c911da8e42e (patch) | |
tree | 8c367ae8b9735df6799c267ad672d558ab81d5c0 /intern | |
parent | f8b3f65d85271c0911c08c5ca5bb6163e9e42a09 (diff) |
Sorry, Kent the indexing changes to this file turn out to be broken
too -- a user reported crashing while using decimation and rolling back
the modifications between rev 1.2 and rev 1.3 for this file fixed it.
Regards,
Chris
Diffstat (limited to 'intern')
-rw-r--r-- | intern/decimation/intern/LOD_QSDecimator.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/intern/decimation/intern/LOD_QSDecimator.cpp b/intern/decimation/intern/LOD_QSDecimator.cpp index 231f076a78c..c1299a2dd37 100644 --- a/intern/decimation/intern/LOD_QSDecimator.cpp +++ b/intern/decimation/intern/LOD_QSDecimator.cpp @@ -187,9 +187,9 @@ CollapseEdge( } else { // the edge could not be collapsed at the moment - so // we adjust it's priority and add it back to the heap. - m_heap->Remove(&edges[0],0); + m_heap->Remove(edges.begin(),0); edges[heap_top].HeapKey() = - MT_INFINITY; - m_heap->Insert(&edges[0],heap_top); + m_heap->Insert(edges.begin(),heap_top); } //clear all the temporary buffers @@ -278,8 +278,7 @@ BuildHeap( heap_vector.push_back(i); } - m_heap->MakeHeap(&edge_set[0]); - + m_heap->MakeHeap(edge_set.begin()); return true; } @@ -308,7 +307,7 @@ UpdateHeap( // inser the new elements into the heap for (; edge_it != end_it; ++edge_it) { - m_heap->Insert(&edge_set[0],*edge_it); + m_heap->Insert(edge_set.begin(),*edge_it); } @@ -319,7 +318,7 @@ UpdateHeap( for (; edge_it != end_it; ++edge_it) { LOD_Edge &e = edge_set[*edge_it]; - m_heap->Remove(&edge_set[0],e.HeapPos()); + m_heap->Remove(edge_set.begin(),e.HeapPos()); e.HeapPos() = 0xffffffff; |