[GRASS-SVN] r51476 - grass/trunk/raster/r.watershed/seg

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 19 10:27:03 EDT 2012


Author: mmetz
Date: 2012-04-19 07:27:03 -0700 (Thu, 19 Apr 2012)
New Revision: 51476

Modified:
   grass/trunk/raster/r.watershed/seg/init_vars.c
Log:
fix pointer, adjust segment size

Modified: grass/trunk/raster/r.watershed/seg/init_vars.c
===================================================================
--- grass/trunk/raster/r.watershed/seg/init_vars.c	2012-04-18 19:13:22 UTC (rev 51475)
+++ grass/trunk/raster/r.watershed/seg/init_vars.c	2012-04-19 14:27:03 UTC (rev 51476)
@@ -325,13 +325,13 @@
 		    }
 		    else {
 			if (wat_map_type == CELL_TYPE) {
-			    wat_value = *((CELL *)ptr);
+			    wat_value = *((CELL *)watptr);
 			}
 			else if (wat_map_type == FCELL_TYPE) {
-			    wat_value = *((FCELL *)ptr);
+			    wat_value = *((FCELL *)watptr);
 			}
 			else if (wat_map_type == DCELL_TYPE) {
-			    wat_value = *((DCELL *)ptr);
+			    wat_value = *((DCELL *)watptr);
 			}
 		    }
 		}
@@ -426,7 +426,7 @@
     G_debug(1, "heap memory %.2f MB", heap_mem);
     /* columns per segment */
     /* larger is faster */
-    seg_cols = seg_rows * seg_rows * seg_rows;
+    seg_cols = seg_rows * seg_rows;
     num_cseg_total = do_points / seg_cols;
     if (do_points % seg_cols > 0)
 	num_cseg_total++;



More information about the grass-commit mailing list