[geos-commits] [SCM] GEOS branch master updated. 75ee569de965ba9c70ae177de381743d8dbb1f7b

git at osgeo.org git at osgeo.org
Tue Apr 28 20:35:09 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  75ee569de965ba9c70ae177de381743d8dbb1f7b (commit)
      from  46fcfd52744779cd67d6a74dc9d69e14f2234ff7 (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 75ee569de965ba9c70ae177de381743d8dbb1f7b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Apr 28 20:35:03 2020 -0700

    use magic for loop iterator

diff --git a/src/index/strtree/BoundablePair.cpp b/src/index/strtree/BoundablePair.cpp
index aa7820c..2b69274 100644
--- a/src/index/strtree/BoundablePair.cpp
+++ b/src/index/strtree/BoundablePair.cpp
@@ -126,8 +126,8 @@ BoundablePair::expand(const Boundable* bndComposite, const Boundable* bndOther,
                       double minDistance)
 {
     std::vector<Boundable*>* children = ((AbstractNode*) bndComposite)->getChildBoundables();
-    for (std::vector<Boundable*>::iterator it = children->begin(); it != children->end(); ++it) {
-        Boundable* child = *it;
+    for (auto& child : *children) {
+
         std::unique_ptr<BoundablePair> bp;
         if (isFlipped) {
             bp.reset(new BoundablePair(bndOther, child, itemDistance));
@@ -139,6 +139,7 @@ BoundablePair::expand(const Boundable* bndComposite, const Boundable* bndOther,
         if (minDistance == std::numeric_limits<double>::infinity() || bp->getDistance() < minDistance) {
             priQ.push(bp.release());
         }
+
     }
 }
 

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

Summary of changes:
 src/index/strtree/BoundablePair.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list