[Bf-committers] Ok to commit the following?

Kent Mein bf-committers@blender.org
Thu, 31 Oct 2002 14:44:05 -0600


Basically two files here and just fixing the indexing a little so
my compiler doesn't complain.

Everything look ok?
I Just took the changes from Phaethon's version but figured they are good to
commit.
(Note the first one the + winds up in just the wrong spot its just replacing
one line even though it looks like its adding two.)

Kent

Index: bsp/intern/BSP_CSGHelper.cpp
===================================================================
RCS file: /cvs01/blender/intern/bsp/intern/BSP_CSGHelper.cpp,v
retrieving revision 1.2
diff -u -r1.2 BSP_CSGHelper.cpp
--- BSP_CSGHelper.cpp	2002/10/13 16:07:39	1.2
+++ BSP_CSGHelper.cpp	2002/10/31 20:39:07
@@ -408,7 +408,7 @@
 			// duplicate the face data for this face.
 			o_f_data.Duplicate(i_f_data[*f_faces_it]);
 
-			output.AddSubTriangle(dup_face,triangle_indices.begin() + i); 
+			output.AddSubTriangle(dup_face,&triangle_indices[i]); 
 		}
 	}
 
Index: decimation/intern/LOD_QSDecimator.cpp
===================================================================
RCS file: /cvs01/blender/intern/decimation/intern/LOD_QSDecimator.cpp,v
retrieving revision 1.2
diff -u -r1.2 LOD_QSDecimator.cpp
--- LOD_QSDecimator.cpp	2002/10/13 16:07:39	1.2
+++ LOD_QSDecimator.cpp	2002/10/31 20:39:07
@@ -183,9 +183,9 @@
 	} 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.begin(),0);
+		m_heap->Remove(&edges[0],0);
 		edges[heap_top].HeapKey() = - MT_INFINITY;
-		m_heap->Insert(edges.begin(),heap_top);
+		m_heap->Insert(&edges[0],heap_top);
 	}
 
 	//clear all the temporary buffers
@@ -274,7 +274,7 @@
 		heap_vector.push_back(i);
 	}
 	
-	m_heap->MakeHeap(edge_set.begin());
+	m_heap->MakeHeap(&edge_set[0]);
 
 	return true;
 }
@@ -304,7 +304,7 @@
 	// inser the new elements into the heap
 
 	for (; edge_it != end_it; ++edge_it) {		
-		m_heap->Insert(edge_set.begin(),*edge_it);
+		m_heap->Insert(&edge_set[0],*edge_it);
 	}
 
 
@@ -315,7 +315,7 @@
 
 	for (; edge_it != end_it; ++edge_it) {
 		LOD_Edge &e = edge_set[*edge_it];
-		m_heap->Remove(edge_set.begin(),e.HeapPos());
+		m_heap->Remove(&edge_set[0],e.HeapPos());
 
 		e.HeapPos() = 0xffffffff;