[geos-commits] r2987 - in trunk: include/geos/geom src/geom

svn_geos at osgeo.org svn_geos at osgeo.org
Sat May 15 08:30:16 EDT 2010


Author: strk
Date: 2010-05-15 08:30:15 -0400 (Sat, 15 May 2010)
New Revision: 2987

Modified:
   trunk/include/geos/geom/CoordinateArraySequence.h
   trunk/src/geom/CoordinateArraySequence.cpp
Log:
Add clear() method to CoordinateArraySequence, inline empty()

Modified: trunk/include/geos/geom/CoordinateArraySequence.h
===================================================================
--- trunk/include/geos/geom/CoordinateArraySequence.h	2010-05-04 21:29:04 UTC (rev 2986)
+++ trunk/include/geos/geom/CoordinateArraySequence.h	2010-05-15 12:30:15 UTC (rev 2987)
@@ -19,7 +19,6 @@
 #include <geos/export.h>
 #include <vector>
 
-//#include <geos/platform.h>
 #include <geos/geom/CoordinateSequence.h>
 
 #include <geos/inline.h>
@@ -69,8 +68,13 @@
 
 	~CoordinateArraySequence();
 
-	bool isEmpty() const;
+	bool isEmpty() const { return empty(); }
 
+	bool empty() const { return vect->empty(); }
+
+	/// Reset this CoordinateArraySequence to the empty state
+	void clear() { vect->clear(); }
+
 	void add(const Coordinate& c);
 
 	virtual void add(const Coordinate& c, bool allowRepeated);

Modified: trunk/src/geom/CoordinateArraySequence.cpp
===================================================================
--- trunk/src/geom/CoordinateArraySequence.cpp	2010-05-04 21:29:04 UTC (rev 2986)
+++ trunk/src/geom/CoordinateArraySequence.cpp	2010-05-15 12:30:15 UTC (rev 2987)
@@ -79,12 +79,6 @@
 	out.insert(out.end(), vect->begin(), vect->end());
 }
 
-bool
-CoordinateArraySequence::isEmpty() const
-{
-	return vect->empty();
-}
-
 void
 CoordinateArraySequence::add(const Coordinate& c)
 {



More information about the geos-commits mailing list