Skip to content
Permalink
Browse files
Optimize stringbuffer_append to avoid strlen calls
References #4614
  • Loading branch information
Algunenano committed Mar 5, 2020
1 parent 8eecc74 commit 8792203
Showing 1 changed file with 2 additions and 5 deletions.
@@ -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);
}
}

0 comments on commit 8792203

Please sign in to comment.