[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha1-42-g6a23a5d

git at osgeo.org git at osgeo.org
Fri Mar 20 07:05:28 PDT 2020


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  6a23a5dbb5ead3ff71a832ce92eb973b31fbcd7d (commit)
      from  3e1ea07b09d893c63b819b6290cd7d91cba01d16 (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 6a23a5dbb5ead3ff71a832ce92eb973b31fbcd7d
Author: Raúl Marín <git at rmr.ninja>
Date:   Fri Mar 20 15:05:12 2020 +0100

    Wagyu: Return NULL when the result is empty
    
    No impact on behaviour, it just avoid unnecessary allocations when
    the whole geometry as dissapeared (for example during clipping)

diff --git a/deps/wagyu/lwgeom_wagyu.cpp b/deps/wagyu/lwgeom_wagyu.cpp
index c1c89e5..60efdf4 100644
--- a/deps/wagyu/lwgeom_wagyu.cpp
+++ b/deps/wagyu/lwgeom_wagyu.cpp
@@ -195,7 +195,11 @@ static LWGEOM *
 wgmpoly_to_lwgeom(const wagyu_multipolygon &mp)
 {
 	const uint32_t ngeoms = mp.size();
-	if (ngeoms == 1)
+	if (ngeoms == 0)
+	{
+		return NULL;
+	}
+	else if (ngeoms == 1)
 	{
 		return wgpoly_to_lwgeom(mp[0]);
 	}
@@ -284,7 +288,7 @@ libwagyu_version()
 {
 	static char str[50] = {0};
 	snprintf(
-	    str, sizeof(str), "%d.%d.%d (Internal)", WAGYU_MAJOR_VERSION, WAGYU_MINOR_VERSION, WAGYU_PATCH_VERSION);
+		str, sizeof(str), "%d.%d.%d (Internal)", WAGYU_MAJOR_VERSION, WAGYU_MINOR_VERSION, WAGYU_PATCH_VERSION);
 
 	return str;
 }

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

Summary of changes:
 deps/wagyu/lwgeom_wagyu.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list