Quellcode durchsuchen

Don't bother checking the return code from G_get_window():
It never returns a failure code, and soon won't return anything


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34481 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements vor 16 Jahren
Ursprung
Commit
75058f05d7

+ 1 - 4
imagery/i.vpoints/drawvect.c

@@ -89,10 +89,7 @@ static int drawvect(int zoomit,	/* -1 = refresh, 0 = new image, 1 = zoom, 2 = wa
 	    get_vector_color();	/* ask line_color to draw map */
 
 	    if (!numfiles) {	/* first map: SET VECTOR WINDOW BY WIND */
-		if (G_get_window(&cellhd) < 0) {
-		    G_warning("Can't read current region parameters");
-		    return 0;
-		}
+		G_get_window(&cellhd);
 		G_copy(&VIEW_MAP2->cell.head, &cellhd, sizeof(cellhd));
 	    }
 	    else		/* not the first map */

+ 1 - 2
raster/r.cost/main.c

@@ -230,8 +230,7 @@ int main(int argc, char *argv[])
     out_file = G_tempfile();
 
     /*  Get database window parameters      */
-    if (G_get_window(&window) < 0)
-	G_fatal_error(_("Unable to read current window parameters"));
+    G_get_window(&window);
 
     /*  Find north-south, east_west and diagonal factors */
     EW_fac = 1.0;

+ 1 - 2
raster/r.out.tiff/main.c

@@ -142,8 +142,7 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Unable to read header of raster map <%s>"),
 		      inopt->answer);
 
-    if ((G_get_window(&cellhd) < 0))
-	G_fatal_error(_("Can't set window"));
+    G_get_window(&cellhd);
 
     G_read_colors(inopt->answer, "", &colors);
     if ((isfp = G_raster_map_is_fp(inopt->answer, "")))

+ 1 - 2
raster/r.surf.idw/main.c

@@ -132,8 +132,7 @@ int main(int argc, char **argv)
     output = parm.output->answer;
 
     /*  Get database window parameters                              */
-    if (G_get_window(&window) < 0)
-	G_fatal_error(_("Unable to read current region parameters"));
+    G_get_window(&window);
 
     /*  find number of rows and columns in window                   */
     nrows = G_window_rows();

+ 1 - 2
raster/r.walk/main.c

@@ -335,8 +335,7 @@ int main(int argc, char *argv[])
 
     /*  Get database window parameters      */
 
-    if (G_get_window(&window) < 0)
-	G_fatal_error(_("Unable to read current window parameters"));
+    G_get_window(&window);
 
     /*  Find north-south, east_west and diagonal factors */
 

+ 1 - 5
raster/r.water.outlet/main.c

@@ -56,7 +56,6 @@ int main(int argc, char *argv[])
     char drain_name[GNAME_MAX], *drain_mapset, E_f, dr_f, ba_f, N_f, errr;
     struct GModule *module;
     struct Option *opt1, *opt2, *opt3, *opt4;
-    char *buf;
 
     G_gisinit(argv[0]);
 
@@ -97,10 +96,7 @@ int main(int argc, char *argv[])
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
-    if (G_get_window(&window) < 0) {
-	G_asprintf(&buf, _("Unable to read current window parameters"));
-	G_fatal_error(buf);
-    }
+    G_get_window(&window);
 
     strcpy(drain_name, opt1->answer);
     strcpy(basin_name, opt2->answer);

+ 1 - 2
raster/wildfire/r.ros/main.c

@@ -437,8 +437,7 @@ int main(int argc, char *argv[])
     }
 
     /*  Get database window parameters  */
-    if (G_get_window(&window) < 0)
-	G_fatal_error("can't read current window parameters");
+    G_get_window(&window);
 
     /*  find number of rows and columns in window    */
     nrows = G_window_rows();

+ 1 - 2
raster/wildfire/r.spread/main.c

@@ -329,8 +329,7 @@ int main(int argc, char *argv[])
 
     /*  Get database window parameters  */
 
-    if (G_get_window(&window) < 0)
-	G_fatal_error("can't read current window parameters");
+    G_get_window(&window);
 
     /*  find number of rows and columns in window    */
 

+ 1 - 2
raster/wildfire/r.spreadpath/main.c

@@ -135,8 +135,7 @@ int main(int argc, char **argv)
     out_file = G_tempfile();
 
     /*  Get database window parameters      */
-    if (G_get_window(&window) < 0)
-	G_fatal_error("can't read current window parameters");
+    G_get_window(&window);
 
     verbose = flag1->answer;