From: Sandro Santilli Date: Thu, 26 Nov 2015 13:00:21 +0000 (+0000) Subject: Reduce paranoia in ST_MakeValid X-Git-Tag: 2.3.0beta1~362 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de364cc1e1dcb81eecc6505fed74669c42afb3b2;p=postgis Reduce paranoia in ST_MakeValid git-svn-id: http://svn.osgeo.org/postgis/trunk@14438 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwgeom_geos_clean.c b/liblwgeom/lwgeom_geos_clean.c index f37e775cd..9dd159e10 100644 --- a/liblwgeom/lwgeom_geos_clean.c +++ b/liblwgeom/lwgeom_geos_clean.c @@ -44,6 +44,7 @@ #include /* #define POSTGIS_DEBUG_LEVEL 4 */ +/* #define PARANOIA_LEVEL 2 */ #undef LWGEOM_PROFILE_MAKEVALID @@ -951,6 +952,7 @@ LWGEOM_GEOS_makeValid(const GEOSGeometry* gin) } } +#if PARANOIA_LEVEL > 1 /* * Now check if every point of input is also found * in output, or abort by returning NULL @@ -958,10 +960,6 @@ LWGEOM_GEOS_makeValid(const GEOSGeometry* gin) * Input geometry was lwgeom_in */ { - const int paranoia = 2; - /* TODO: check if the result is valid */ - if (paranoia) - { int loss; GEOSGeometry *pi, *po, *pd; @@ -981,8 +979,8 @@ LWGEOM_GEOS_makeValid(const GEOSGeometry* gin) lwnotice("Vertices lost in LWGEOM_GEOS_makeValid"); /* return NULL */ } - } } +#endif /* PARANOIA_LEVEL > 1 */ return gout;