[GRASS-SVN] r72885 - grass-addons/grass7/raster/r.accumulate

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 22 14:39:11 PDT 2018


Author: hcho
Date: 2018-06-22 14:39:11 -0700 (Fri, 22 Jun 2018)
New Revision: 72885

Modified:
   grass-addons/grass7/raster/r.accumulate/accumulate.c
Log:
r.accumulate: Rename acc_flow to acc

Modified: grass-addons/grass7/raster/r.accumulate/accumulate.c
===================================================================
--- grass-addons/grass7/raster/r.accumulate/accumulate.c	2018-06-22 21:34:24 UTC (rev 72884)
+++ grass-addons/grass7/raster/r.accumulate/accumulate.c	2018-06-22 21:39:11 UTC (rev 72885)
@@ -7,15 +7,15 @@
 {
     int rows = weight_buf.rows, cols = weight_buf.cols;
     int i, j, neighbor_dir, loop_dir;
-    double acc_flow;
+    double acc;
 
     if (done[row][col])
 	return get(acc_buf, row, col);
 
     if (weight_buf.map.v)
-	acc_flow = get(weight_buf, row, col);
+	acc = get(weight_buf, row, col);
     else
-	acc_flow = 1.0;
+	acc = 1.0;
 
     for (i = -1; i <= 1; i++) {
 	if (row + i < 0 || row + i >= rows)
@@ -72,14 +72,14 @@
 		break;
 	    }
 	    if (loop_dir && dir_buf[row][col] != loop_dir)
-		acc_flow +=
+		acc +=
 		    accumulate(dir_buf, weight_buf, acc_buf, done, row + i,
 			       col + j);
 	}
     }
 
-    set(acc_buf, row, col, acc_flow);
+    set(acc_buf, row, col, acc);
     done[row][col] = 1;
 
-    return acc_flow;
+    return acc;
 }



More information about the grass-commit mailing list