[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0beta1-66-g718917d95

git at osgeo.org git at osgeo.org
Tue Jul 25 10:14:48 PDT 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  718917d953ce6dce61ed8c4220bc5537d4feaff6 (commit)
      from  7b15e8ce757b335a4d82c8d89520a37793736e84 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 718917d953ce6dce61ed8c4220bc5537d4feaff6
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Jul 25 10:14:38 2023 -0700

    Reformat some conditionals

diff --git a/liblwgeom/lwalgorithm.c b/liblwgeom/lwalgorithm.c
index 5d2fffb17..a2220048c 100644
--- a/liblwgeom/lwalgorithm.c
+++ b/liblwgeom/lwalgorithm.c
@@ -31,28 +31,25 @@
 int
 p4d_same(const POINT4D *p1, const POINT4D *p2)
 {
-	if( FP_EQUALS(p1->x,p2->x) && FP_EQUALS(p1->y,p2->y) && FP_EQUALS(p1->z,p2->z) && FP_EQUALS(p1->m,p2->m) )
-		return LW_TRUE;
-	else
-		return LW_FALSE;
+	return FP_EQUALS(p1->x, p2->x)
+	    && FP_EQUALS(p1->y, p2->y)
+	    && FP_EQUALS(p1->z, p2->z)
+	    && FP_EQUALS(p1->m, p2->m);
 }
 
 int
 p3d_same(const POINT3D *p1, const POINT3D *p2)
 {
-	if( FP_EQUALS(p1->x,p2->x) && FP_EQUALS(p1->y,p2->y) && FP_EQUALS(p1->z,p2->z) )
-		return LW_TRUE;
-	else
-		return LW_FALSE;
+	return FP_EQUALS(p1->x, p2->x)
+	    && FP_EQUALS(p1->y, p2->y)
+	    && FP_EQUALS(p1->z, p2->z);
 }
 
 int
 p2d_same(const POINT2D *p1, const POINT2D *p2)
 {
-	if( FP_EQUALS(p1->x,p2->x) && FP_EQUALS(p1->y,p2->y) )
-		return LW_TRUE;
-	else
-		return LW_FALSE;
+	return FP_EQUALS(p1->x, p2->x)
+	    && FP_EQUALS(p1->y, p2->y);
 }
 
 /**
diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c
index 6692485e7..2581a1f17 100644
--- a/liblwgeom/ptarray.c
+++ b/liblwgeom/ptarray.c
@@ -2130,9 +2130,14 @@ ptarray_grid_in_place(POINTARRAY *pa, const gridspec *grid)
 		}
 
 		/* Skip duplicates */
-		if (p_out && p_out->x == x && p_out->y == y && (ndims > 2 ? p_out->z == z : 1) &&
+		if (p_out &&
+		    p_out->x == x &&
+		    p_out->y == y &&
+		    (ndims > 2 ? p_out->z == z : 1) &&
 		    (ndims > 3 ? p_out->m == m : 1))
+		{
 			continue;
+		}
 
 		/* Write rounded values into the next available point */
 		p_out = (POINT4D *)(getPoint_internal(pa, j++));

-----------------------------------------------------------------------

Summary of changes:
 liblwgeom/lwalgorithm.c | 21 +++++++++------------
 liblwgeom/ptarray.c     |  7 ++++++-
 2 files changed, 15 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list