[geos-commits] r3864 - trunk/src/triangulate

svn_geos at osgeo.org svn_geos at osgeo.org
Sun Aug 4 05:27:11 PDT 2013


Author: strk
Date: 2013-08-04 05:27:11 -0700 (Sun, 04 Aug 2013)
New Revision: 3864

Modified:
   trunk/src/triangulate/DelaunayTriangulationBuilder.cpp
Log:
Avoid Coordinate copies in DelaunayTriangulationBuilder::envelope

Modified: trunk/src/triangulate/DelaunayTriangulationBuilder.cpp
===================================================================
--- trunk/src/triangulate/DelaunayTriangulationBuilder.cpp	2013-08-04 12:23:01 UTC (rev 3863)
+++ trunk/src/triangulate/DelaunayTriangulationBuilder.cpp	2013-08-04 12:27:11 UTC (rev 3864)
@@ -134,14 +134,15 @@
 	return subdiv->getTriangles(geomFact);
 }
 
-geom::Envelope DelaunayTriangulationBuilder::envelope(const geom::CoordinateSequence& coords)
+geom::Envelope
+DelaunayTriangulationBuilder::envelope(const geom::CoordinateSequence& coords)
 {
 	Envelope env;
 	std::vector<Coordinate> coord_vector;
 	coords.toVector(coord_vector);
 	for(std::vector<Coordinate>::iterator it= coord_vector.begin() ; it!=coord_vector.end() ; ++it)
 	{   
-		Coordinate coord = *it;
+		const Coordinate& coord = *it;
 		env.expandToInclude(coord);
 	}   
 	return env;



More information about the geos-commits mailing list