[geos-devel] Re: [geos-commits] r3046 - trunk/src/geom

2010-06-21 Thread Maxime van Noppen
On 06/21/2010 02:53 AM, svn_g...@osgeo.org wrote: Modified: trunk/src/geom/GeometryCollection.cpp Log: Geometry::getGeometryN is an API function, so make it safe/checked Is there a guideline on such topics ? The runtime cost of an additional if() is quite high in such a method, could

Re: [geos-devel] Re: [geos-commits] r3046 - trunk/src/geom

2010-06-21 Thread Maxime van Noppen
On 06/21/2010 11:22 AM, strk wrote: Not really. You're right about additional cost, but I dubt it'll really be noticeable. Have some profiles ? Not directly on geos but testing the same scenario against a trivial example (attached) gives these results on gcc 4.4.3 : $ g++ -O0 -o bench

Re: [geos-devel] Re: [geos-commits] r3046 - trunk/src/geom

2010-06-21 Thread strk
Alright, convinced. Thanks for the review. r3060 has them back unchecked, with checks moved at PHP level. --strk; On Mon, Jun 21, 2010 at 01:23:08PM +0200, Maxime van Noppen wrote: On 06/21/2010 11:22 AM, strk wrote: Not really. You're right about additional cost, but I dubt it'll really

Re: [geos-devel] Re: [geos-commits] r3046 - trunk/src/geom

2010-06-21 Thread Maxime van Noppen
On 06/21/2010 04:32 PM, strk wrote: Alright, convinced. Thanks for the review. r3060 has them back unchecked, with checks moved at PHP level. Great ! :) -- Maxime ___ geos-devel mailing list geos-devel@lists.osgeo.org

[geos-devel] Re: linearref::LinearIterator segfaults

2010-06-21 Thread Martin Davis
Thanks, strk. I added a check in the LinearIterator constructor: /** * Creates an iterator starting at * a component and vertex in a linear {...@link Geometry} * * @param linearGeom the linear geometry to iterate over * @param componentIndex the component to start at * @param