[geos-commits] [SCM] GEOS branch master updated. 72b256ec6d6c5f321c2db65d3d1aa5e586f65f8c

git at osgeo.org git at osgeo.org
Tue Dec 11 13:57:53 PST 2018


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  72b256ec6d6c5f321c2db65d3d1aa5e586f65f8c (commit)
      from  6f46a0ba7c8c9194bbc14ded2ecbaaa9bf0c1630 (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 72b256ec6d6c5f321c2db65d3d1aa5e586f65f8c
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Dec 11 13:57:41 2018 -0800

    Reformat CGAlgorithmsDD

diff --git a/include/geos/algorithm/CGAlgorithmsDD.h b/include/geos/algorithm/CGAlgorithmsDD.h
index 2b581b7..20e9972 100644
--- a/include/geos/algorithm/CGAlgorithmsDD.h
+++ b/include/geos/algorithm/CGAlgorithmsDD.h
@@ -29,10 +29,10 @@ typedef ttmath::Big<TTMATH_BITS(32), TTMATH_BITS(128)> DD;
 
 // Forward declarations
 namespace geos {
-	namespace geom {
-	class Coordinate;
-	class CoordinateSequence;
-	}
+namespace geom {
+class Coordinate;
+class CoordinateSequence;
+}
 }
 
 namespace geos {
@@ -45,17 +45,17 @@ class GEOS_DLL CGAlgorithmsDD {
 
 public:
 
-	enum {
-		CLOCKWISE=-1,
-		COLLINEAR=0,
-		COUNTERCLOCKWISE=1
-	};
+    enum {
+        CLOCKWISE=-1,
+        COLLINEAR=0,
+        COUNTERCLOCKWISE=1
+    };
 
-	enum {
-		RIGHT=-1,
-		LEFT=1,
-		STRAIGHT=0
-	};
+    enum {
+        RIGHT=-1,
+        LEFT=1,
+        STRAIGHT=0
+    };
 
     /**
      * Returns the index of the direction of the point <code>q</code> relative to
@@ -96,20 +96,21 @@ public:
                                       const geom::Coordinate& pb,
                                       const geom::Coordinate& pc);
 
-    static int signum(double x) {
+    static int signum(double x)
+    {
         if (x > 0) return 1;
         if (x < 0) return -1;
         return 0;
     }
 
     static void intersection(const geom::Coordinate& p1, const geom::Coordinate& p2,
-                   					 const geom::Coordinate& q1, const geom::Coordinate& q2,
-         		       					 geom::Coordinate &rv);
+                             const geom::Coordinate& q1, const geom::Coordinate& q2,
+                             geom::Coordinate &rv);
 
 
 protected:
 
-		static int signOfDet2x2(DD &x1, DD &y1, DD &x2, DD &y2);
+    static int signOfDet2x2(DD &x1, DD &y1, DD &x2, DD &y2);
 
 };
 
diff --git a/src/algorithm/CGAlgorithmsDD.cpp b/src/algorithm/CGAlgorithmsDD.cpp
index ecc95d3..6663691 100644
--- a/src/algorithm/CGAlgorithmsDD.cpp
+++ b/src/algorithm/CGAlgorithmsDD.cpp
@@ -25,24 +25,24 @@ using namespace geos::geom;
 
 namespace {
 
-	double const DP_SAFE_EPSILON =  1e-15;
+double const DP_SAFE_EPSILON =  1e-15;
 
-	inline int SigNumDD(DD const& dd)
-	{
-	    static DD const zero(0.0);
-	    if (dd < zero)
-	        return -1;
+inline int SigNumDD(DD const& dd)
+{
+    static DD const zero(0.0);
+    if (dd < zero)
+        return -1;
 
-	    if (dd > zero)
-	        return 1;
+    if (dd > zero)
+        return 1;
 
-	    return 0;
-	}
+    return 0;
+}
 
-	inline std::string ToStringDD(DD const& dd)
-	{
-	    return dd.ToString();
-	}
+inline std::string ToStringDD(DD const& dd)
+{
+    return dd.ToString();
+}
 }
 
 namespace geos {
@@ -82,16 +82,20 @@ int CGAlgorithmsDD::orientationIndexFilter(const Coordinate& pa,
     if (detleft > 0.0) {
         if (detright <= 0.0) {
             return signum(det);
-        } else {
+        }
+        else {
             detsum = detleft + detright;
         }
-    } else if (detleft < 0.0) {
+    }
+    else if (detleft < 0.0) {
         if (detright >= 0.0) {
             return signum(det);
-        } else {
+        }
+        else {
             detsum = -detleft - detright;
         }
-    } else {
+    }
+    else {
         return signum(det);
     }
 

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

Summary of changes:
 include/geos/algorithm/CGAlgorithmsDD.h | 37 +++++++++++++++---------------
 src/algorithm/CGAlgorithmsDD.cpp        | 40 ++++++++++++++++++---------------
 2 files changed, 41 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list