[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha1-37-g8792203

git at osgeo.org git at osgeo.org
Thu Mar 5 01:54:55 PST 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  87922037fd09b68ad2ada409f776e06590924256 (commit)
      from  8eecc746627f200f0df834ca19a3aea92db3782f (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 87922037fd09b68ad2ada409f776e06590924256
Author: Raúl Marín <git at rmr.ninja>
Date:   Thu Mar 5 10:42:21 2020 +0100

    Optimize stringbuffer_append to avoid strlen calls
    
    References #4614

diff --git a/liblwgeom/lwout_wkt.c b/liblwgeom/lwout_wkt.c
index 60b4bbd..7f38d0f 100644
--- a/liblwgeom/lwout_wkt.c
+++ b/liblwgeom/lwout_wkt.c
@@ -110,11 +110,8 @@ static void ptarray_to_wkt_sb(const POINTARRAY *ptarray, stringbuffer_t *sb, int
 			/* Spaces before every ordinate but the first */
 			if ( j > 0 )
 				stringbuffer_append_len(sb, " ", 1);
-			lwprint_double(dbl_ptr[j],
-				       precision,
-				       coord,
-				       buffer_size);
-			stringbuffer_append(sb, coord);
+			int len = lwprint_double(dbl_ptr[j], precision, coord, buffer_size);
+			stringbuffer_append_len(sb, coord, len);
 		}
 	}
 

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

Summary of changes:
 liblwgeom/lwout_wkt.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list