From d48ea169fa2c217a412d80d8b74eae3b973c4f89 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 21 Oct 2004 19:46:36 +0000 Subject: [PATCH] ZMflags check on costituent geometries only performed when there is at least one. git-svn-id: http://svn.osgeo.org/postgis/trunk@1035 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwcollection.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lwgeom/lwcollection.c b/lwgeom/lwcollection.c index 61e7bf0cd..95639b6f6 100644 --- a/lwgeom/lwcollection.c +++ b/lwgeom/lwcollection.c @@ -24,16 +24,16 @@ lwcollection_construct(unsigned int type, int SRID, BOX2DFLOAT4 *bbox, { hasz = TYPE_HASZ(geoms[0]->type); hasm = TYPE_HASM(geoms[0]->type); - } - #ifdef CHECK_LWGEOM_ZM - zm = TYPE_GETZM(geoms[0]->type); - for (i=1; itype) ) - lwerror("lwcollection_construct: mixed dimension geometries"); - } + zm = TYPE_GETZM(geoms[0]->type); + for (i=1; itype) ) + lwerror("lwcollection_construct: mixed dimension geometries"); + } #endif + } + ret = lwalloc(sizeof(LWCOLLECTION)); ret->type = lwgeom_makeType_full(hasz, hasm, (SRID!=-1), -- 2.40.0