[geos-commits] r3203 - trunk/src/operation/union

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Feb 11 05:28:30 EST 2011


Author: strk
Date: 2011-02-11 02:28:29 -0800 (Fri, 11 Feb 2011)
New Revision: 3203

Modified:
   trunk/src/operation/union/PointGeometryUnion.cpp
Log:
Optimize container->container copy, on Mat's suggestion

Modified: trunk/src/operation/union/PointGeometryUnion.cpp
===================================================================
--- trunk/src/operation/union/PointGeometryUnion.cpp	2011-02-11 09:58:36 UTC (rev 3202)
+++ trunk/src/operation/union/PointGeometryUnion.cpp	2011-02-11 10:28:29 UTC (rev 3203)
@@ -68,9 +68,8 @@
   }
   else
   {
-    std::vector<Coordinate> coords;
-    std::copy(exteriorCoords.begin(), exteriorCoords.end(),
-      back_inserter(coords));
+    std::vector<Coordinate> coords(exteriorCoords.size());
+    std::copy(exteriorCoords.begin(), exteriorCoords.end(), coords.begin());
     ptComp.reset( geomFact->createMultiPoint(coords) );
   }
 



More information about the geos-commits mailing list