Remove remaining GEODEBUG references from geo_ops.c
authorTomas Vondra
Thu, 16 Aug 2018 17:55:43 +0000 (19:55 +0200)
committerTomas Vondra
Thu, 16 Aug 2018 17:55:43 +0000 (19:55 +0200)
Commit a7dc63d904a6044d299aebdf59ad3199b6a9e99d 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

src/backend/utils/adt/geo_ops.c

index 4490f933ba93e427b5ee1849eb1caa3b58331610..bd8e21775db85f2887ab469dd44eb17ce443c985 100644 (file)
@@ -2423,12 +2423,7 @@ dist_ppoly_internal(Point *pt, POLYGON *poly)
    LSEG        seg;
 
    if (point_inside(pt, poly->npts, poly->p) != 0)
-   {
-#ifdef GEODEBUG
-       printf("dist_ppoly_internal- point inside of polygon\n");
-#endif
        return 0.0;
-   }
 
    /* initialize distance with segment between first and last points */
    seg.p[0].x = poly->p[0].x;
@@ -2436,9 +2431,6 @@ dist_ppoly_internal(Point *pt, POLYGON *poly)
    seg.p[1].x = poly->p[poly->npts - 1].x;
    seg.p[1].y = poly->p[poly->npts - 1].y;
    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 */
    for (i = 0; i < poly->npts - 1; i++)
@@ -2448,9 +2440,6 @@ dist_ppoly_internal(Point *pt, POLYGON *poly)
        seg.p[1].x = poly->p[i + 1].x;
        seg.p[1].y = poly->p[i + 1].y;
        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)
            result = d;
    }
@@ -5233,16 +5222,8 @@ plist_same(int npts, Point *p1, Point *p2)
                if (j >= npts)
                    j = 0;
                if (!point_eq_point(&p2[j], &p1[ii]))
-               {
-#ifdef GEODEBUG
-                   printf("plist_same- %d failed forward match with %d\n", j, ii);
-#endif
                    break;
-               }
            }
-#ifdef GEODEBUG
-           printf("plist_same- ii = %d/%d after forward match\n", ii, npts);
-#endif
            if (ii == npts)
                return true;
 
@@ -5252,16 +5233,8 @@ plist_same(int npts, Point *p1, Point *p2)
                if (j < 0)
                    j = (npts - 1);
                if (!point_eq_point(&p2[j], &p1[ii]))
-               {
-#ifdef GEODEBUG
-                   printf("plist_same- %d failed reverse match with %d\n", j, ii);
-#endif
                    break;
-               }
            }
-#ifdef GEODEBUG
-           printf("plist_same- ii = %d/%d after reverse match\n", ii, npts);
-#endif
            if (ii == npts)
                return true;
        }