]> granicus.if.org Git - postgis/commitdiff
minor cleanups and comments
authorSandro Santilli <strk@keybit.net>
Mon, 28 Nov 2005 11:48:27 +0000 (11:48 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 28 Nov 2005 11:48:27 +0000 (11:48 +0000)
git-svn-id: http://svn.osgeo.org/postgis/branches/pgis_1_0@2086 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_functions_basic.c

index d60aefadc6c7a6f82f579e52a874b895a2902938..7ae8d46552acbc1c998c05cd75bd18a3b7b519ee 100644 (file)
@@ -1429,6 +1429,7 @@ Datum LWGEOM_force_collection(PG_FUNCTION_ARGS)
        else
        {
                SRID = lwgeom->SRID;
+               /* We transfer bbox ownership from input to output */
                bbox = lwgeom->bbox;
                lwgeom->SRID = -1;
                lwgeom->bbox = NULL;
@@ -1477,6 +1478,7 @@ Datum LWGEOM_force_multi(PG_FUNCTION_ARGS)
        {
                type += 3;
                SRID = lwgeom->SRID;
+               /* We transfer bbox ownership from input to output */
                box = lwgeom->bbox;
                lwgeom->SRID=-1;
                lwgeom->bbox=NULL;
@@ -1950,8 +1952,7 @@ Datum LWGEOM_collect_garray(PG_FUNCTION_ARGS)
 
                        /* COMPUTE_BBOX WHEN_SIMPLE */
                        if ( lwgeoms[i]->bbox ) {
-                               box = palloc(sizeof(BOX2DFLOAT4));
-                               memcpy(box, lwgeoms[i]->bbox, sizeof(BOX2DFLOAT4));
+                               box = box2d_clone(lwgeoms[i]->bbox);
                        }
                }
                else