Kaynağa Gözat

r.cost: fix heap

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62039 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 10 yıl önce
ebeveyn
işleme
3af328be49
2 değiştirilmiş dosya ile 2 ekleme ve 6 silme
  1. 1 1
      raster/r.cost/cost.h
  2. 1 5
      raster/r.cost/heap.c

+ 1 - 1
raster/r.cost/cost.h

@@ -37,7 +37,7 @@
 struct cost
 {
     double min_cost;
-    unsigned int age;
+    long age;
     int row;
     int col;
 };

+ 1 - 5
raster/r.cost/heap.c

@@ -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 @@ int cmp_costs(struct cost *a, struct cost *b)
 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) {