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 there be, at least, a compilation flag to activate/deactivate such
statements ?

>From a C++ point of view, the STL (for example std::vector) is designed
to have both methods (fast: operator[], safe: std::vector::at()) to let
the programmer decide which is best (safety vs performance).

-- 
Maxime
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to