[geos-devel] Assertions in CoordinateArraySequence

Charlie Savage cfis at savagexi.com
Sun Jun 25 19:37:28 EDT 2006


CoordinateArraySequence has a number of assertions that check to see if 
the requested index is out of bounds of the array.  If it is, then the 
assertion is thrown - at least in Debug mode.

I'd guess assertions are off in Release builds (haven't checked), so a 
segmentation fault would occur.

Could this be changed to exceptions?  When playing around at the command 
line with Ruby or Python, its not very nice to have your application 
terminate because you specify an invalid index.

The reason I can see for not doing this is the extra overhead in 
checking the bounds - is that the case?  If so, are there profiling 
results showing that it really is a big deal?

Thanks,

Charlie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20060625/4e469262/smime.bin


More information about the geos-devel mailing list