[GRASS-SVN] r36111 - grass/trunk/lib/vector/dglib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 26 11:09:04 EST 2009


Author: mmetz
Date: 2009-02-26 11:09:04 -0500 (Thu, 26 Feb 2009)
New Revision: 36111

Modified:
   grass/trunk/lib/vector/dglib/heap.c
Log:
removing my comments in heap.c

Modified: grass/trunk/lib/vector/dglib/heap.c
===================================================================
--- grass/trunk/lib/vector/dglib/heap.c	2009-02-26 15:58:06 UTC (rev 36110)
+++ grass/trunk/lib/vector/dglib/heap.c	2009-02-26 16:09:04 UTC (rev 36111)
@@ -64,7 +64,6 @@
 
     i = ++pheap->index;
 
-
     while (i != 1 && key < pheap->pnode[i / 2].key) {
 	pheap->pnode[i] = pheap->pnode[i / 2];
 	i /= 2;
@@ -87,7 +86,7 @@
 
     *pnoderet = pheap->pnode[1];
 
-    temp = pheap->pnode[pheap->index--]; /* keep last item */
+    temp = pheap->pnode[pheap->index--];
 
     iparent = 1;
     ichild = 2;
@@ -98,13 +97,13 @@
 	    ichild++;
 	}
 	if (temp.key <= pheap->pnode[ichild].key)
-	    break;    /* are you sure ? */
+	    break;
 
 	pheap->pnode[iparent] = pheap->pnode[ichild];
 	iparent = ichild;
 	ichild *= 2;
     }
-    pheap->pnode[iparent] = temp; /* reinsert last item */
+    pheap->pnode[iparent] = temp;
 
     return 1;
 }
@@ -157,7 +156,7 @@
 	    ichild++;
 	}
 	if (temp.key >= pheap->pnode[ichild].key)
-	    break;     /* are you sure ? */
+	    break;
 
 	pheap->pnode[iparent] = pheap->pnode[ichild];
 	iparent = ichild;



More information about the grass-commit mailing list