[GRASS-SVN] r60916 - grass/trunk/raster/r.spread
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jun 21 19:06:11 PDT 2014
Author: annakrat
Date: 2014-06-21 19:06:11 -0700 (Sat, 21 Jun 2014)
New Revision: 60916
Modified:
grass/trunk/raster/r.spread/main.c
Log:
r.spread: specify default parameter (fixed copy paste error)
Modified: grass/trunk/raster/r.spread/main.c
===================================================================
--- grass/trunk/raster/r.spread/main.c 2014-06-22 01:46:17 UTC (rev 60915)
+++ grass/trunk/raster/r.spread/main.c 2014-06-22 02:06:11 UTC (rev 60916)
@@ -232,6 +232,7 @@
parm.init_time->key = "init_time";
parm.init_time->type = TYPE_STRING;
parm.init_time->key_desc = "int (>= 0)"; /* TODO: move to ->options */
+ parm.init_time->answer = "0";
parm.init_time->label =
_("Initial time for current simulation (0) (min)");
parm.init_time->description =
@@ -378,17 +379,13 @@
comp_dens = 0.5;
}
/*Check the given initial time and simulation time lag, assign the default if needed */
- if (parm.init_time->answer) {
- init_time = atoi(parm.init_time->answer);
- if (init_time < 0) {
- G_warning("Illegal initial time <%s>", parm.init_time->answer);
- G_usage();
- exit(EXIT_FAILURE);
- }
+ init_time = atoi(parm.init_time->answer);
+ if (init_time < 0) {
+ G_warning("Illegal initial time <%s>", parm.init_time->answer);
+ G_usage();
+ exit(EXIT_FAILURE);
}
- else {
- time_lag = 0;
- }
+
if (parm.time_lag->answer) {
time_lag = atoi(parm.time_lag->answer);
if (time_lag < 0) {
More information about the grass-commit
mailing list