[geos-commits] [SCM] GEOS branch master updated. 917520838cdf6221abcf792795da051e22ef3ad6

git at osgeo.org git at osgeo.org
Fri Sep 13 19:30:24 PDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  917520838cdf6221abcf792795da051e22ef3ad6 (commit)
      from  98594fd421edad01c73a78148595a1fbc6a0e14f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 917520838cdf6221abcf792795da051e22ef3ad6
Author: Daniel Baston <dbaston at gmail.com>
Date:   Fri Sep 13 22:29:29 2019 -0400

    Avoid Polygon->Geometry conversion in CoverageUnion

diff --git a/src/operation/union/CoverageUnion.cpp b/src/operation/union/CoverageUnion.cpp
index 2735f6d..4988d5a 100644
--- a/src/operation/union/CoverageUnion.cpp
+++ b/src/operation/union/CoverageUnion.cpp
@@ -101,12 +101,7 @@ std::unique_ptr<Geometry> CoverageUnion::polygonize(const GeometryFactory* gf) {
         return std::unique_ptr<Geometry>((*polygons)[0].release());
     }
 
-    std::unique_ptr<std::vector<Geometry*>> geoms{new std::vector<Geometry*>{polygons->size()}};
-    for (size_t i = 0; i < polygons->size(); i++) {
-        (*geoms)[i] = (*polygons)[i].release();
-    }
-
-    return std::unique_ptr<Geometry>{gf->createMultiPolygon(geoms.release())};
+    return gf->createMultiPolygon(std::move(*polygons));
 }
 
 std::unique_ptr<geom::Geometry> CoverageUnion::Union(const geom::Geometry* geom) {

-----------------------------------------------------------------------

Summary of changes:
 src/operation/union/CoverageUnion.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list