[geos-commits] [SCM] GEOS branch master updated. e7ab9b94e213b56a38208d87c746e159f306aa41

git at osgeo.org git at osgeo.org
Tue Apr 28 20:42:33 PDT 2020


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  e7ab9b94e213b56a38208d87c746e159f306aa41 (commit)
      from  75ee569de965ba9c70ae177de381743d8dbb1f7b (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 e7ab9b94e213b56a38208d87c746e159f306aa41
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Apr 28 20:42:28 2020 -0700

    avoid some tiny copy overhead using emplace over push

diff --git a/src/operation/distance/FacetSequence.cpp b/src/operation/distance/FacetSequence.cpp
index e1589c7..164866f 100644
--- a/src/operation/distance/FacetSequence.cpp
+++ b/src/operation/distance/FacetSequence.cpp
@@ -151,11 +151,9 @@ FacetSequence::updateNearestLocationsPointLine(const Coordinate& pt,
     geom::LineSegment seg(q0, q1);
     Coordinate segClosestPoint;
     seg.closestPoint(pt, segClosestPoint);
-    GeometryLocation gl0(geom, start, pt);
-    GeometryLocation gl1(facetSeq.geom, i, segClosestPoint);
     locs->clear();
-    locs->push_back(gl0);
-    locs->push_back(gl1);
+    locs->emplace_back(geom, start, pt);
+    locs->emplace_back(facetSeq.geom, i, segClosestPoint);
     return;
 }
 
@@ -197,12 +195,10 @@ FacetSequence::updateNearestLocationsLineLine(size_t i, const Coordinate& p0, co
     LineSegment seg1(q0, q1);
 
     auto closestPts = seg0.closestPoints(seg1);
-    GeometryLocation gl0(geom, i, closestPts[0]);
-    GeometryLocation gl1(facetSeq.geom, j, closestPts[1]);
 
     locs->clear();
-    locs->push_back(gl0);
-    locs->push_back(gl1);
+    locs->emplace_back(geom, i, closestPts[0]);
+    locs->emplace_back(facetSeq.geom, j, closestPts[1]);
 }
 
 void

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

Summary of changes:
 src/operation/distance/FacetSequence.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list