Commit a082aed0 authored by Tomas Vondra's avatar Tomas Vondra

Remove remaining GEODEBUG references from geo_ops.c

Commit a7dc63d9 removed most of the
GEODEBUG occurrences, but there were a couple remaining. So remove
them too, to get rid of the macro entirely.

Author: Emre Hasegeli

Discussion: https://www.postgresql.org/message-id/CAE2gYzxF7-5djV6-cEvqQu-fNsnt%3DEqbOURx7ZDg%2BVv6ZMTWbg%40mail.gmail.com
parent e1d19c90
...@@ -2423,12 +2423,7 @@ dist_ppoly_internal(Point *pt, POLYGON *poly) ...@@ -2423,12 +2423,7 @@ dist_ppoly_internal(Point *pt, POLYGON *poly)
LSEG seg; LSEG seg;
if (point_inside(pt, poly->npts, poly->p) != 0) if (point_inside(pt, poly->npts, poly->p) != 0)
{
#ifdef GEODEBUG
printf("dist_ppoly_internal- point inside of polygon\n");
#endif
return 0.0; return 0.0;
}
/* initialize distance with segment between first and last points */ /* initialize distance with segment between first and last points */
seg.p[0].x = poly->p[0].x; seg.p[0].x = poly->p[0].x;
...@@ -2436,9 +2431,6 @@ dist_ppoly_internal(Point *pt, POLYGON *poly) ...@@ -2436,9 +2431,6 @@ dist_ppoly_internal(Point *pt, POLYGON *poly)
seg.p[1].x = poly->p[poly->npts - 1].x; seg.p[1].x = poly->p[poly->npts - 1].x;
seg.p[1].y = poly->p[poly->npts - 1].y; seg.p[1].y = poly->p[poly->npts - 1].y;
result = lseg_closept_point(NULL, &seg, pt); result = lseg_closept_point(NULL, &seg, pt);
#ifdef GEODEBUG
printf("dist_ppoly_internal- segment 0/n distance is %f\n", result);
#endif
/* check distances for other segments */ /* check distances for other segments */
for (i = 0; i < poly->npts - 1; i++) for (i = 0; i < poly->npts - 1; i++)
...@@ -2448,9 +2440,6 @@ dist_ppoly_internal(Point *pt, POLYGON *poly) ...@@ -2448,9 +2440,6 @@ dist_ppoly_internal(Point *pt, POLYGON *poly)
seg.p[1].x = poly->p[i + 1].x; seg.p[1].x = poly->p[i + 1].x;
seg.p[1].y = poly->p[i + 1].y; seg.p[1].y = poly->p[i + 1].y;
d = lseg_closept_point(NULL, &seg, pt); d = lseg_closept_point(NULL, &seg, pt);
#ifdef GEODEBUG
printf("dist_ppoly_internal- segment %d distance is %f\n", (i + 1), d);
#endif
if (d < result) if (d < result)
result = d; result = d;
} }
...@@ -5233,16 +5222,8 @@ plist_same(int npts, Point *p1, Point *p2) ...@@ -5233,16 +5222,8 @@ plist_same(int npts, Point *p1, Point *p2)
if (j >= npts) if (j >= npts)
j = 0; j = 0;
if (!point_eq_point(&p2[j], &p1[ii])) if (!point_eq_point(&p2[j], &p1[ii]))
{
#ifdef GEODEBUG
printf("plist_same- %d failed forward match with %d\n", j, ii);
#endif
break; break;
} }
}
#ifdef GEODEBUG
printf("plist_same- ii = %d/%d after forward match\n", ii, npts);
#endif
if (ii == npts) if (ii == npts)
return true; return true;
...@@ -5252,16 +5233,8 @@ plist_same(int npts, Point *p1, Point *p2) ...@@ -5252,16 +5233,8 @@ plist_same(int npts, Point *p1, Point *p2)
if (j < 0) if (j < 0)
j = (npts - 1); j = (npts - 1);
if (!point_eq_point(&p2[j], &p1[ii])) if (!point_eq_point(&p2[j], &p1[ii]))
{
#ifdef GEODEBUG
printf("plist_same- %d failed reverse match with %d\n", j, ii);
#endif
break; break;
} }
}
#ifdef GEODEBUG
printf("plist_same- ii = %d/%d after reverse match\n", ii, npts);
#endif
if (ii == npts) if (ii == npts)
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment