[GRASS-SVN] r57657 - grass/trunk/vector/v.distance
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 13 15:11:07 PDT 2013
Author: mmetz
Date: 2013-09-13 15:11:07 -0700 (Fri, 13 Sep 2013)
New Revision: 57657
Modified:
grass/trunk/vector/v.distance/main.c
Log:
v.distance: clean up search steps
Modified: grass/trunk/vector/v.distance/main.c
===================================================================
--- grass/trunk/vector/v.distance/main.c 2013-09-13 22:01:47 UTC (rev 57656)
+++ grass/trunk/vector/v.distance/main.c 2013-09-13 22:11:07 UTC (rev 57657)
@@ -392,6 +392,14 @@
}
/* last step always max */
max_step[n_max_steps - 1] = max;
+ j = 1;
+ for (i = 1; i < n_max_steps; i++) {
+ if (max_step[j - 1] < max_step[i]) {
+ max_step[j] = max_step[i];
+ j++;
+ }
+ }
+ n_max_steps = j;
}
else {
max_step = G_malloc(sizeof(double));
More information about the grass-commit
mailing list