[geos-commits] r3901 - in trunk: include/geos/triangulate/quadedge src/triangulate/quadedge
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Aug 20 05:15:35 PDT 2013
Author: strk
Date: 2013-08-20 05:15:35 -0700 (Tue, 20 Aug 2013)
New Revision: 3901
Modified:
trunk/include/geos/triangulate/quadedge/Vertex.h
trunk/src/triangulate/quadedge/Vertex.cpp
Log:
Change operator< for Vertex to be inlined and use Coordinate operator<
Modified: trunk/include/geos/triangulate/quadedge/Vertex.h
===================================================================
--- trunk/include/geos/triangulate/quadedge/Vertex.h 2013-08-20 12:15:20 UTC (rev 3900)
+++ trunk/include/geos/triangulate/quadedge/Vertex.h 2013-08-20 12:15:35 UTC (rev 3901)
@@ -265,7 +265,9 @@
const geom::Coordinate &p1);
};
-GEOS_DLL bool operator<(const Vertex& v1 ,const Vertex& v2);
+inline bool operator<(const Vertex& v1, const Vertex& v2) {
+ return v1.getCoordinate() < v2.getCoordinate();
+}
} //namespace geos.triangulate.quadedge
} //namespace geos.triangulate
Modified: trunk/src/triangulate/quadedge/Vertex.cpp
===================================================================
--- trunk/src/triangulate/quadedge/Vertex.cpp 2013-08-20 12:15:20 UTC (rev 3900)
+++ trunk/src/triangulate/quadedge/Vertex.cpp 2013-08-20 12:15:35 UTC (rev 3901)
@@ -190,16 +190,6 @@
return pz;
}
-bool operator<(const Vertex& v1 ,const Vertex& v2)
-{
- if(v1.getCoordinate().x < v2.getCoordinate().x)
- return 1;
- else if(v1.getCoordinate().x == v2.getCoordinate().x && v1.getCoordinate().y < v2.getCoordinate().y)
- return 1;
- return 0;
-}
-
-
} //namespace geos.triangulate.quadedge
} //namespace geos.triangulate
} //namespace geos
More information about the geos-commits
mailing list