[geos-commits] r3590 - in trunk/include/geos: geomgraph noding

svn_geos at osgeo.org svn_geos at osgeo.org
Thu Apr 5 06:30:39 EDT 2012


Author: strk
Date: 2012-04-05 03:30:39 -0700 (Thu, 05 Apr 2012)
New Revision: 3590

Modified:
   trunk/include/geos/geomgraph/EdgeList.h
   trunk/include/geos/noding/OrientedCoordinateArray.h
Log:
Make OrientedCoordinateArray comparable

Modified: trunk/include/geos/geomgraph/EdgeList.h
===================================================================
--- trunk/include/geos/geomgraph/EdgeList.h	2012-04-05 10:30:29 UTC (rev 3589)
+++ trunk/include/geos/geomgraph/EdgeList.h	2012-04-05 10:30:39 UTC (rev 3590)
@@ -66,7 +66,7 @@
 			const noding::OrientedCoordinateArray *oca1,
 			const noding::OrientedCoordinateArray *oca2) const
 		{
-			return oca1->compareTo(*oca2)<0;
+			return *oca1 < *oca2;
 		}
 	};
 

Modified: trunk/include/geos/noding/OrientedCoordinateArray.h
===================================================================
--- trunk/include/geos/noding/OrientedCoordinateArray.h	2012-04-05 10:30:29 UTC (rev 3589)
+++ trunk/include/geos/noding/OrientedCoordinateArray.h	2012-04-05 10:30:39 UTC (rev 3590)
@@ -98,6 +98,15 @@
 
 };
 
+/// Strict weak ordering operator for OrientedCoordinateArray
+//
+/// This is the C++ equivalent of JTS's compareTo
+inline bool operator< ( const OrientedCoordinateArray& oca1,
+                        const OrientedCoordinateArray& oca2 )
+{
+  return oca1.compareTo(oca2)<0;
+}
+
 } // namespace geos.noding
 } // namespace geos
 



More information about the geos-commits mailing list