[GRASS-SVN] r34460 - in grass/trunk: raster/r.flow
raster/r.resamp.rst raster/r.sun raster/r.terraflow
vector/v.surf.rst vector/v.vol.rst
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 23 18:21:52 EST 2008
Author: glynn
Date: 2008-11-23 18:21:52 -0500 (Sun, 23 Nov 2008)
New Revision: 34460
Modified:
grass/trunk/raster/r.flow/main.c
grass/trunk/raster/r.resamp.rst/main.c
grass/trunk/raster/r.sun/main.c
grass/trunk/raster/r.terraflow/main.cc
grass/trunk/vector/v.surf.rst/main.c
grass/trunk/vector/v.vol.rst/main.c
Log:
Don't bother checking the return code from G_get_set_window()
It never returns a failure code, and soon won't return anything
Modified: grass/trunk/raster/r.flow/main.c
===================================================================
--- grass/trunk/raster/r.flow/main.c 2008-11-23 23:09:08 UTC (rev 34459)
+++ grass/trunk/raster/r.flow/main.c 2008-11-23 23:21:52 UTC (rev 34460)
@@ -493,10 +493,8 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
+ G_get_set_window(®ion);
- if (G_get_set_window(®ion) == -1)
- G_fatal_error(_("Unable to get current region"));
-
larger = ((region.cols < region.rows) ? region.rows : region.cols);
default_skip = (larger < 50) ? 1 : (int)(larger / 50);
Modified: grass/trunk/raster/r.resamp.rst/main.c
===================================================================
--- grass/trunk/raster/r.resamp.rst/main.c 2008-11-23 23:09:08 UTC (rev 34459)
+++ grass/trunk/raster/r.resamp.rst/main.c 2008-11-23 23:21:52 UTC (rev 34460)
@@ -283,8 +283,7 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
- if (G_get_set_window(&winhd) == -1)
- G_fatal_error(_("Retrieving and setting region failed"));
+ G_get_set_window(&winhd);
inp_ew_res = winhd.ew_res;
inp_ns_res = winhd.ns_res;
Modified: grass/trunk/raster/r.sun/main.c
===================================================================
--- grass/trunk/raster/r.sun/main.c 2008-11-23 23:09:08 UTC (rev 34459)
+++ grass/trunk/raster/r.sun/main.c 2008-11-23 23:21:52 UTC (rev 34460)
@@ -361,8 +361,7 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
- if (G_get_set_window(&cellhd) == -1)
- G_fatal_error("G_get_set_window() failed");
+ G_get_set_window(&cellhd);
stepx = cellhd.ew_res;
stepy = cellhd.ns_res;
Modified: grass/trunk/raster/r.terraflow/main.cc
===================================================================
--- grass/trunk/raster/r.terraflow/main.cc 2008-11-23 23:09:08 UTC (rev 34459)
+++ grass/trunk/raster/r.terraflow/main.cc 2008-11-23 23:21:52 UTC (rev 34460)
@@ -461,9 +461,8 @@
parse_args(argc, argv);
/* get the current region and dimensions */
- if (G_get_set_window(region) == -1) {
- G_fatal_error("r.terraflow: error getting current region");
- }
+ G_get_set_window(region);
+
check_args();
int nr = G_window_rows();
Modified: grass/trunk/vector/v.surf.rst/main.c
===================================================================
--- grass/trunk/vector/v.surf.rst/main.c 2008-11-23 23:09:08 UTC (rev 34459)
+++ grass/trunk/vector/v.surf.rst/main.c 2008-11-23 23:21:52 UTC (rev 34460)
@@ -334,8 +334,7 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
- if (G_get_set_window(&cellhd) == -1)
- G_fatal_error("G_get_set_window() failed");
+ G_get_set_window(&cellhd);
ew_res = cellhd.ew_res;
ns_res = cellhd.ns_res;
Modified: grass/trunk/vector/v.vol.rst/main.c
===================================================================
--- grass/trunk/vector/v.vol.rst/main.c 2008-11-23 23:09:08 UTC (rev 34459)
+++ grass/trunk/vector/v.vol.rst/main.c 2008-11-23 23:21:52 UTC (rev 34460)
@@ -434,8 +434,7 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
- if (G_get_set_window(&cellhd) == -1)
- G_fatal_error("G_get_set_window() failed");
+ G_get_set_window(&cellhd);
G3d_getWindow(¤t_region);
G3d_readWindow(¤t_region, NULL);
More information about the grass-commit
mailing list