[GRASS-SVN] r30055 - grass/trunk/vector/v.generalize

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 10 10:52:25 EST 2008


Author: neteler
Date: 2008-02-10 10:52:25 -0500 (Sun, 10 Feb 2008)
New Revision: 30055

Modified:
   grass/trunk/vector/v.generalize/smoothing.c
Log:
use GRASS_EPSILON; no exit() needed after G_fatal_error

Modified: grass/trunk/vector/v.generalize/smoothing.c
===================================================================
--- grass/trunk/vector/v.generalize/smoothing.c	2008-02-10 15:09:41 UTC (rev 30054)
+++ grass/trunk/vector/v.generalize/smoothing.c	2008-02-10 15:52:25 UTC (rev 30055)
@@ -258,7 +258,7 @@
 void refine_tangent(POINT * p)
 {
     double l = point_dist2(*p);
-    if (l < 1e-12) {
+    if (l < GRASS_EPSILON) {
 	point_scalar(*p, 0.0, p);
     }
     else {
@@ -369,10 +369,8 @@
     point_assign(Points, n - 1, with_z, &p0);
     point_list_add(last, p0);
 
-    if (point_list_copy_to_line_pnts(head, Points) == -1) {
+    if (point_list_copy_to_line_pnts(head, Points) == -1)
 	G_fatal_error(_("Out of memory"));
-	exit(1);
-    }
 
     point_list_free(head);
     return Points->n_points;



More information about the grass-commit mailing list