[geos-commits] [SCM] GEOS branch master updated. 25448d877a94df6ae8f243d617c975f3a5d67911

git at osgeo.org git at osgeo.org
Wed Apr 10 14:29:14 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  25448d877a94df6ae8f243d617c975f3a5d67911 (commit)
      from  99545f866498d415508d35886c18c577d4ab2876 (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 25448d877a94df6ae8f243d617c975f3a5d67911
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Apr 10 14:28:58 2019 -0700

    Strip out commented dead code

diff --git a/README.md b/README.md
index 3af5ae8..8f6d012 100644
--- a/README.md
+++ b/README.md
@@ -136,6 +136,7 @@ To format your code into the desired style, use astyle 3.1:
 
     astyle --style=stroustrup \
            --unpad-paren \
+           --pad-header \
            --pad-comma \
            --indent=spaces=4 \
            --align-pointer=type \
diff --git a/src/index/strtree/BoundablePair.cpp b/src/index/strtree/BoundablePair.cpp
index d168f95..2705244 100644
--- a/src/index/strtree/BoundablePair.cpp
+++ b/src/index/strtree/BoundablePair.cpp
@@ -37,7 +37,7 @@ BoundablePair::BoundablePair(const Boundable* p_boundable1, const Boundable* p_b
 const Boundable*
 BoundablePair::getBoundable(int i) const
 {
-    if(i == 0) {
+    if (i == 0) {
         return boundable1;
     }
     return boundable2;
@@ -47,7 +47,7 @@ double
 BoundablePair::distance() const
 {
     // if items, compute exact distance
-    if(isLeaves()) {
+    if (isLeaves()) {
         return itemDistance->distance((ItemBoundable*) boundable1, (ItemBoundable*) boundable2);
     }
 
@@ -55,7 +55,7 @@ BoundablePair::distance() const
     const geom::Envelope* e1 = (const geom::Envelope*) boundable1->getBounds();
     const geom::Envelope* e2 = (const geom::Envelope*) boundable2->getBounds();
 
-    if(!e1 || !e2) {
+    if (!e1 || !e2) {
         throw util::GEOSException("Can't compute envelope of item in BoundablePair");
     }
     return e1->distance(e2);
@@ -97,7 +97,7 @@ BoundablePair::expandToQueue(BoundablePairQueue& priQ, double minDistance)
      * Otherwise, simply expand whichever is composite.
      */
     if (isComp1 && isComp2) {
-        if(area(boundable1) > area(boundable2)) {
+        if (area(boundable1) > area(boundable2)) {
             expand(boundable1, boundable2, false, priQ, minDistance);
             return;
         }
@@ -118,28 +118,13 @@ BoundablePair::expandToQueue(BoundablePairQueue& priQ, double minDistance)
     throw geos::util::IllegalArgumentException("neither boundable is composite");
 }
 
-// void
-// BoundablePair::expand(const Boundable* bndComposite, const Boundable* bndOther,
-//                       bool isFlipped, BoundablePairQueue& priQ,
-//                       double minDistance)
-// {
-//     std::vector<Boundable*> children = ((AbstractNode*) bndComposite)->getChildBoundables();
-//     for(std::vector<Boundable*>::iterator it = children.begin(); it != children.end(); ++it) {
-//         Boundable* child = *it;
-//         std::unique_ptr<BoundablePair> bp(new BoundablePair(child, bndOther, itemDistance));
-//         if(minDistance == std::numeric_limits<double>::infinity() || bp->getDistance() < minDistance) {
-//             priQ.push(bp.release());
-//         }
-//     }
-// }
-
 void
 BoundablePair::expand(const Boundable* bndComposite, const Boundable* bndOther,
                       bool isFlipped, BoundablePairQueue& priQ,
                       double minDistance)
 {
     std::vector<Boundable*>* children = ((AbstractNode*) bndComposite)->getChildBoundables();
-    for(std::vector<Boundable*>::iterator it = children->begin(); it != children->end(); ++it) {
+    for (std::vector<Boundable*>::iterator it = children->begin(); it != children->end(); ++it) {
         Boundable* child = *it;
         std::unique_ptr<BoundablePair> bp;
         if (isFlipped) {
@@ -149,7 +134,7 @@ BoundablePair::expand(const Boundable* bndComposite, const Boundable* bndOther,
             bp.reset(new BoundablePair(child, bndOther, itemDistance));
         }
 
-        if(minDistance == std::numeric_limits<double>::infinity() || bp->getDistance() < minDistance) {
+        if (minDistance == std::numeric_limits<double>::infinity() || bp->getDistance() < minDistance) {
             priQ.push(bp.release());
         }
     }

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

Summary of changes:
 README.md                           |  1 +
 src/index/strtree/BoundablePair.cpp | 27 ++++++---------------------
 2 files changed, 7 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list