[GRASS-SVN] r62040 - grass/branches/releasebranch_7_0/raster/r.cost

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 20 05:07:06 PDT 2014


Author: mmetz
Date: 2014-09-20 05:07:06 -0700 (Sat, 20 Sep 2014)
New Revision: 62040

Modified:
   grass/branches/releasebranch_7_0/raster/r.cost/cost.h
   grass/branches/releasebranch_7_0/raster/r.cost/heap.c
Log:
r.cost: fix heap

Modified: grass/branches/releasebranch_7_0/raster/r.cost/cost.h
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.cost/cost.h	2014-09-20 12:06:55 UTC (rev 62039)
+++ grass/branches/releasebranch_7_0/raster/r.cost/cost.h	2014-09-20 12:07:06 UTC (rev 62040)
@@ -37,7 +37,7 @@
 struct cost
 {
     double min_cost;
-    unsigned int age;
+    long age;
     int row;
     int col;
 };

Modified: grass/branches/releasebranch_7_0/raster/r.cost/heap.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.cost/heap.c	2014-09-20 12:06:55 UTC (rev 62039)
+++ grass/branches/releasebranch_7_0/raster/r.cost/heap.c	2014-09-20 12:07:06 UTC (rev 62040)
@@ -39,8 +39,8 @@
  */
 
 
-#include <grass/gis.h>
 #include <stdlib.h>
+#include <grass/gis.h>
 #include <grass/glocale.h>
 #include "cost.h"
 
@@ -92,11 +92,7 @@
 long sift_up(long start, struct cost * child_pnt)
 {
     register long parent, child;
-    int r, c;
 
-    r = child_pnt->row;
-    c = child_pnt->col;
-    
     child = start;
 
     while (child > 1) {



More information about the grass-commit mailing list