[geos-commits] r2757 - in trunk: build/msvc90/geos_lib capi source/geom source/geom/util source/headers/geos source/headers/geos/geom source/headers/geos/noding source/headers/geos/operation/overlay source/headers/geos/simplify source/index/quadtree source/noding source/noding/snapround source/operation/overlay source/operation/overlay/snap source/operation/overlay/validate source/precision source/simplify tests/unit/geom tests/unit/geom/prep tests/unit/operation/buffer

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Dec 1 10:39:43 EST 2009


Author: mloskot
Date: 2009-12-01 10:39:41 -0500 (Tue, 01 Dec 2009)
New Revision: 2757

Modified:
   trunk/build/msvc90/geos_lib/geos_lib.vcproj
   trunk/capi/geos_ts_c.cpp
   trunk/source/geom/GeometryComponentFilter.cpp
   trunk/source/geom/PrecisionModel.cpp
   trunk/source/geom/util/GeometryTransformer.cpp
   trunk/source/headers/geos/geom/BinaryOp.h
   trunk/source/headers/geos/geom/Geometry.h
   trunk/source/headers/geos/noding/Octant.h
   trunk/source/headers/geos/noding/ScaledNoder.h
   trunk/source/headers/geos/operation/overlay/PointBuilder.h
   trunk/source/headers/geos/simplify/TaggedLinesSimplifier.h
   trunk/source/headers/geos/util.h
   trunk/source/index/quadtree/NodeBase.cpp
   trunk/source/noding/NodedSegmentString.cpp
   trunk/source/noding/ScaledNoder.cpp
   trunk/source/noding/snapround/MCIndexPointSnapper.cpp
   trunk/source/operation/overlay/OverlayOp.cpp
   trunk/source/operation/overlay/snap/GeometrySnapper.cpp
   trunk/source/operation/overlay/snap/SnapIfNeededOverlayOp.cpp
   trunk/source/operation/overlay/validate/FuzzyPointLocator.cpp
   trunk/source/precision/CommonBitsRemover.cpp
   trunk/source/simplify/DouglasPeuckerSimplifier.cpp
   trunk/tests/unit/geom/DimensionTest.cpp
   trunk/tests/unit/geom/MultiPointTest.cpp
   trunk/tests/unit/geom/prep/PreparedGeometryFactoryTest.cpp
   trunk/tests/unit/operation/buffer/BufferOpTest.cpp
Log:
* More fixes for incompleteness of types required by std::auto_ptr
* Replaced utility macros with disappearing ignorance template trick.


Modified: trunk/build/msvc90/geos_lib/geos_lib.vcproj
===================================================================
--- trunk/build/msvc90/geos_lib/geos_lib.vcproj	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/build/msvc90/geos_lib/geos_lib.vcproj	2009-12-01 15:39:41 UTC (rev 2757)
@@ -53,6 +53,7 @@
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="false"
 				DebugInformationFormat="4"
+				ShowIncludes="false"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"

Modified: trunk/capi/geos_ts_c.cpp
===================================================================
--- trunk/capi/geos_ts_c.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/capi/geos_ts_c.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -1452,21 +1452,22 @@
     try
     {
         BufferParameters bp;
-	bp.setEndCapStyle( BufferParameters::CAP_FLAT );
+        bp.setEndCapStyle( BufferParameters::CAP_FLAT );
         bp.setQuadrantSegments(quadsegs);
 
         if ( joinStyle > BufferParameters::JOIN_BEVEL )
         {
-        	throw IllegalArgumentException("Invalid buffer join style");
+            throw IllegalArgumentException("Invalid buffer join style");
         }
         bp.setJoinStyle(
-        	static_cast<BufferParameters::JoinStyle>(joinStyle)
-        );
+            static_cast<BufferParameters::JoinStyle>(joinStyle)
+            );
         bp.setMitreLimit(mitreLimit);
 
-	BufferBuilder bufBuilder (bp);
-        Geometry *g3 = bufBuilder.bufferLineSingleSided(g1, width, leftSide);
-	
+        bool isLeftSide = leftSide == 0 ? false : true;
+        BufferBuilder bufBuilder (bp);
+        Geometry *g3 = bufBuilder.bufferLineSingleSided(g1, width, isLeftSide);
+
         return g3;
     }
     catch (const std::exception &e)

Modified: trunk/source/geom/GeometryComponentFilter.cpp
===================================================================
--- trunk/source/geom/GeometryComponentFilter.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/geom/GeometryComponentFilter.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -25,13 +25,13 @@
 
 void GeometryComponentFilter::filter_rw(Geometry *geom)
 {
-	UNREFERENCED_PARAMETER(geom);
+	::geos::ignore_unused_variable_warning(geom);
 	assert(0);
 }
 
 void GeometryComponentFilter::filter_ro(const Geometry *geom)
 {
-	UNREFERENCED_PARAMETER(geom);
+	::geos::ignore_unused_variable_warning(geom);
 	assert(0);
 }
 

Modified: trunk/source/geom/PrecisionModel.cpp
===================================================================
--- trunk/source/geom/PrecisionModel.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/geom/PrecisionModel.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -110,8 +110,8 @@
 	:
 	modelType(FIXED)
 {
-    UNREFERENCED_PARAMETER(newOffsetX);
-    UNREFERENCED_PARAMETER(newOffsetY);
+    ::geos::ignore_unused_variable_warning(newOffsetX);
+    ::geos::ignore_unused_variable_warning(newOffsetY);
 
 #if GEOS_DEBUG
 	cerr<<"PrecisionModel["<<this<<"] ctor(scale,offsets)"<<endl;

Modified: trunk/source/geom/util/GeometryTransformer.cpp
===================================================================
--- trunk/source/geom/util/GeometryTransformer.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/geom/util/GeometryTransformer.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -115,7 +115,7 @@
 		const Geometry* parent)
 {
 
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformCoordinates(CoordinateSequence " << coords <<", Geometry " << parent << ");" << std::endl;
 #endif
@@ -128,7 +128,7 @@
 		const Point* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformPoint(Point " << geom <<", Geometry " << parent << ");" << std::endl;
@@ -145,7 +145,7 @@
 		const MultiPoint* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformMultiPoint(MultiPoint " << geom <<", Geometry " << parent << ");" << std::endl;
@@ -176,7 +176,7 @@
 		const LinearRing* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformLinearRing(LinearRing " << geom <<", Geometry " << parent << ");" << std::endl;
@@ -202,7 +202,7 @@
 		const LineString* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformLineString(LineString " << geom <<", Geometry " << parent << ");" << std::endl;
@@ -218,7 +218,7 @@
 		const MultiLineString* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformMultiLineString(MultiLineString " << geom <<", Geometry " << parent << ");" << std::endl;
@@ -249,7 +249,7 @@
 		const Polygon* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformPolygon(Polygon " << geom <<", Geometry " << parent << ");" << std::endl;
@@ -322,7 +322,7 @@
 		const MultiPolygon* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformMultiPolygon(MultiPolygon " << geom <<", Geometry " << parent << ");" << std::endl;
@@ -353,7 +353,7 @@
 		const GeometryCollection* geom,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 #if GEOS_DEBUG
 	std::cerr << "GeometryTransformer::transformGeometryCollection(GeometryCollection " << geom <<", Geometry " << parent << ");" << std::endl;

Modified: trunk/source/headers/geos/geom/BinaryOp.h
===================================================================
--- trunk/source/headers/geos/geom/BinaryOp.h	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/headers/geos/geom/BinaryOp.h	2009-12-01 15:39:41 UTC (rev 2757)
@@ -263,7 +263,7 @@
 	}
 	catch (const util::TopologyException& ex)
 	{
-        UNREFERENCED_PARAMETER(ex);
+        ::geos::ignore_unused_variable_warning(ex);
 #if GEOS_DEBUG_BINARYOP
 		std::cerr << "CBR: " << ex.what() << std::endl;
 #endif
@@ -293,7 +293,7 @@
 	}
 	catch (const util::TopologyException& ex)
 	{
-        UNREFERENCED_PARAMETER(ex);
+        ::geos::ignore_unused_variable_warning(ex);
 #if GEOS_DEBUG_BINARYOP
 		std::cerr << "SNAP: " << ex.what() << std::endl;
 #endif

Modified: trunk/source/headers/geos/geom/Geometry.h
===================================================================
--- trunk/source/headers/geos/geom/Geometry.h	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/headers/geos/geom/Geometry.h	2009-12-01 15:39:41 UTC (rev 2757)
@@ -41,7 +41,6 @@
 		class CoordinateFilter;
 		class CoordinateSequence;
 		class CoordinateSequenceFilter;
-		class Envelope;
 		class GeometryComponentFilter;
 		class GeometryFactory;
 		class GeometryFilter;

Modified: trunk/source/headers/geos/noding/Octant.h
===================================================================
--- trunk/source/headers/geos/noding/Octant.h	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/headers/geos/noding/Octant.h	2009-12-01 15:39:41 UTC (rev 2757)
@@ -65,7 +65,7 @@
 	
     static int octant(const geom::Coordinate* p0, const geom::Coordinate* p1)
     {
-        UNREFERENCED_PARAMETER(p0);
+        ::geos::ignore_unused_variable_warning(p0);
 		return octant(*p0, *p1);
 	}
 };

Modified: trunk/source/headers/geos/noding/ScaledNoder.h
===================================================================
--- trunk/source/headers/geos/noding/ScaledNoder.h	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/headers/geos/noding/ScaledNoder.h	2009-12-01 15:39:41 UTC (rev 2757)
@@ -106,7 +106,7 @@
 
 	void filter_ro(const geom::Coordinate* c)
     {
-        UNREFERENCED_PARAMETER(c);
+        ::geos::ignore_unused_variable_warning(c);
         assert(0);
     }
 

Modified: trunk/source/headers/geos/operation/overlay/PointBuilder.h
===================================================================
--- trunk/source/headers/geos/operation/overlay/PointBuilder.h	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/headers/geos/operation/overlay/PointBuilder.h	2009-12-01 15:39:41 UTC (rev 2757)
@@ -89,7 +89,7 @@
 		geometryFactory(newGeometryFactory),
 		resultPointList(new std::vector<geom::Point *>())
 	{
-        UNREFERENCED_PARAMETER(newPtLocator);
+        ::geos::ignore_unused_variable_warning(newPtLocator);
     }
 
 	/**

Modified: trunk/source/headers/geos/simplify/TaggedLinesSimplifier.h
===================================================================
--- trunk/source/headers/geos/simplify/TaggedLinesSimplifier.h	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/headers/geos/simplify/TaggedLinesSimplifier.h	2009-12-01 15:39:41 UTC (rev 2757)
@@ -33,13 +33,12 @@
 #include <cassert>
 
 #include <geos/simplify/LineSegmentIndex.h> // for templated function body
+#include <geos/simplify/TaggedLineStringSimplifier.h>
 
 // Forward declarations
 namespace geos {
 	namespace simplify {
-		//class LineSegmentIndex;
 		class TaggedLineString;
-		class TaggedLineStringSimplifier;
 	}
 }
 

Modified: trunk/source/headers/geos/util.h
===================================================================
--- trunk/source/headers/geos/util.h	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/headers/geos/util.h	2009-12-01 15:39:41 UTC (rev 2757)
@@ -36,8 +36,11 @@
 // Private macros definition 
 // 
 
-#ifndef UNREFERENCED_PARAMETER 
-#define UNREFERENCED_PARAMETER(p) ((void)p)
-#endif 
+namespace geos
+{
+    template<class T>
+    void ignore_unused_variable_warning(T const& ) {}
+}
 
+
 #endif // GEOS_UTIL_H

Modified: trunk/source/index/quadtree/NodeBase.cpp
===================================================================
--- trunk/source/index/quadtree/NodeBase.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/index/quadtree/NodeBase.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -217,7 +217,7 @@
 void
 NodeBase::visitItems(const Envelope* searchEnv, ItemVisitor& visitor)
 {
-    UNREFERENCED_PARAMETER(searchEnv);
+    ::geos::ignore_unused_variable_warning(searchEnv);
 
 	// would be nice to filter items based on search envelope, but can't
 	// until they contain an envelope

Modified: trunk/source/noding/NodedSegmentString.cpp
===================================================================
--- trunk/source/noding/NodedSegmentString.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/noding/NodedSegmentString.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -65,7 +65,7 @@
 		unsigned int segmentIndex,
 		int geomIndex, int intIndex)
 {
-    UNREFERENCED_PARAMETER(geomIndex);
+    ::geos::ignore_unused_variable_warning(geomIndex);
 
 	const Coordinate &intPt=li->getIntersection(intIndex);
 	addIntersection(intPt, segmentIndex);

Modified: trunk/source/noding/ScaledNoder.cpp
===================================================================
--- trunk/source/noding/ScaledNoder.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/noding/ScaledNoder.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -107,7 +107,7 @@
 
 	void filter_ro(const geom::Coordinate* c)
     {
-        UNREFERENCED_PARAMETER(c);
+        ::geos::ignore_unused_variable_warning(c);
         assert(0);
     }
 

Modified: trunk/source/noding/snapround/MCIndexPointSnapper.cpp
===================================================================
--- trunk/source/noding/snapround/MCIndexPointSnapper.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/noding/snapround/MCIndexPointSnapper.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -77,7 +77,7 @@
 
 	void select(const LineSegment& ls)
 	{
-		UNREFERENCED_PARAMETER(ls);
+		::geos::ignore_unused_variable_warning(ls);
 	}
 
 };

Modified: trunk/source/operation/overlay/OverlayOp.cpp
===================================================================
--- trunk/source/operation/overlay/OverlayOp.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/operation/overlay/OverlayOp.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -971,7 +971,7 @@
 	// Add your tests here
 
 #else
-    UNREFERENCED_PARAMETER(opCode);
+    ::geos::ignore_unused_variable_warning(opCode);
 #endif
 
 #ifdef ENABLE_OVERLAY_RESULT_VALIDATOR

Modified: trunk/source/operation/overlay/snap/GeometrySnapper.cpp
===================================================================
--- trunk/source/operation/overlay/snap/GeometrySnapper.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/operation/overlay/snap/GeometrySnapper.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -79,7 +79,7 @@
 			const CoordinateSequence* coords,
 			const Geometry* parent)
 	{
-        UNREFERENCED_PARAMETER(parent);
+        ::geos::ignore_unused_variable_warning(parent);
 		return snapLine(coords);
 	}
 

Modified: trunk/source/operation/overlay/snap/SnapIfNeededOverlayOp.cpp
===================================================================
--- trunk/source/operation/overlay/snap/SnapIfNeededOverlayOp.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/operation/overlay/snap/SnapIfNeededOverlayOp.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -22,6 +22,7 @@
 #include <geos/operation/overlay/snap/SnapOverlayOp.h>
 #include <geos/operation/overlay/OverlayOp.h>
 #include <geos/geom/Geometry.h> // for use in auto_ptr
+#include <geos/Util.h>
 
 #include <cassert>
 #include <limits> // for numeric_limits
@@ -60,9 +61,7 @@
 
 	}
 	catch (std::exception& ex) {
-		// ignore this exception, since the operation will be rerun
-		//      System.out.println(ex.getMessage());
-		//      ex.printStackTrace();
+        ::geos::ignore_unused_variable_warning(ex);
 #if GEOS_DEBUG
 		std::cerr << "Overlay op threw " << ex.what() << ". Will try snapping now" << std::endl;
 #endif

Modified: trunk/source/operation/overlay/validate/FuzzyPointLocator.cpp
===================================================================
--- trunk/source/operation/overlay/validate/FuzzyPointLocator.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/operation/overlay/validate/FuzzyPointLocator.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -61,7 +61,7 @@
 std::auto_ptr<Geometry>
 FuzzyPointLocator::extractLineWork(const geom::Geometry& geom)
 {
-    UNREFERENCED_PARAMETER(geom);
+    ::geos::ignore_unused_variable_warning(geom);
 
 	vector<Geometry*>* lineGeoms = new vector<Geometry*>();
 	try { // geoms array will leak if an exception is thrown
@@ -94,7 +94,7 @@
 std::auto_ptr<Geometry>
 FuzzyPointLocator::getLineWork(const geom::Geometry& geom)
 {
-    UNREFERENCED_PARAMETER(geom);
+    ::geos::ignore_unused_variable_warning(geom);
 
 	vector<Geometry*>* lineGeoms = new vector<Geometry*>();
 	try { // geoms array will leak if an exception is thrown

Modified: trunk/source/precision/CommonBitsRemover.cpp
===================================================================
--- trunk/source/precision/CommonBitsRemover.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/precision/CommonBitsRemover.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -52,7 +52,7 @@
 
 	void filter_ro(const geom::Coordinate *coord)  //Not used
     {
-        UNREFERENCED_PARAMETER(coord);
+        ::geos::ignore_unused_variable_warning(coord);
         assert(0);
     };
 
@@ -73,7 +73,7 @@
 	void filter_rw(geom::Coordinate *coord) const
 	{
         // CommonCoordinateFilter is a read-only filter
-        UNREFERENCED_PARAMETER(coord);
+        ::geos::ignore_unused_variable_warning(coord);
 		assert(0);
 	}
 

Modified: trunk/source/simplify/DouglasPeuckerSimplifier.cpp
===================================================================
--- trunk/source/simplify/DouglasPeuckerSimplifier.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/source/simplify/DouglasPeuckerSimplifier.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -103,7 +103,7 @@
 		const CoordinateSequence* coords,
 		const Geometry* parent)
 {
-    UNREFERENCED_PARAMETER(parent);
+    ::geos::ignore_unused_variable_warning(parent);
 
 	const Coordinate::Vect* inputPts = coords->toVector();
 	assert(inputPts);

Modified: trunk/tests/unit/geom/DimensionTest.cpp
===================================================================
--- trunk/tests/unit/geom/DimensionTest.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/tests/unit/geom/DimensionTest.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -52,7 +52,7 @@
     {
 		// Just compile-time test
 		geos::geom::Dimension dim;
-        UNREFERENCED_PARAMETER(dim);
+        ::geos::ignore_unused_variable_warning(dim);
     }
 
     // Test of toDimensionSymbol()

Modified: trunk/tests/unit/geom/MultiPointTest.cpp
===================================================================
--- trunk/tests/unit/geom/MultiPointTest.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/tests/unit/geom/MultiPointTest.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -84,7 +84,7 @@
 	{
 		const size_t size0 = 0;
 		MultiPointAutoPtr copy(dynamic_cast<geos::geom::MultiPoint*>(empty_mp_->clone()));
-		ensure( copy.get() );
+		ensure( 0 != copy.get() );
 		
 		ensure( copy->isEmpty() );
 		ensure( copy->isSimple() );

Modified: trunk/tests/unit/geom/prep/PreparedGeometryFactoryTest.cpp
===================================================================
--- trunk/tests/unit/geom/prep/PreparedGeometryFactoryTest.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/tests/unit/geom/prep/PreparedGeometryFactoryTest.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -67,7 +67,7 @@
     void object::test<1>()
     {
         prep::PreparedGeometryFactory pgf;
-        UNREFERENCED_PARAMETER(pgf);
+        ::geos::ignore_unused_variable_warning(pgf);
     }
 
     // Test passing null-pointer to prepare static method

Modified: trunk/tests/unit/operation/buffer/BufferOpTest.cpp
===================================================================
--- trunk/tests/unit/operation/buffer/BufferOpTest.cpp	2009-12-01 13:05:29 UTC (rev 2756)
+++ trunk/tests/unit/operation/buffer/BufferOpTest.cpp	2009-12-01 15:39:41 UTC (rev 2757)
@@ -40,6 +40,10 @@
         {
             ensure_equals(default_quadrant_segments, int(8));
         }
+    private:
+        // noncopyable
+        test_bufferop_data(test_bufferop_data const& other);
+        test_bufferop_data& operator=(test_bufferop_data const& rhs);
     };
 
     typedef test_group<test_bufferop_data> group;
@@ -66,7 +70,7 @@
         ensure(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure_equals(gBuffer->getNumPoints(), 0);
+        ensure_equals(gBuffer->getNumPoints(), std::size_t(0));
     }
 
     template<>
@@ -86,7 +90,7 @@
         ensure_not(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure(gBuffer->getNumPoints() > 32);
+        ensure(gBuffer->getNumPoints() > std::size_t(32));
     }
 
     template<>
@@ -111,7 +115,7 @@
         ensure_not(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure(gBuffer->getNumPoints() > 129);
+        ensure(gBuffer->getNumPoints() > std::size_t(129));
     }
 
     template<>
@@ -135,7 +139,7 @@
             ensure_not(gBuffer->isEmpty());
             ensure(gBuffer->isValid());
             ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-            ensure(gBuffer->getNumPoints() >= 245);
+            ensure(gBuffer->getNumPoints() >= std::size_t(245));
         }
 
         // Buffer point with custom parameters: 32 quadrant segments
@@ -148,7 +152,7 @@
             ensure_not(gBuffer->isEmpty());
             ensure(gBuffer->isValid());
             ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-            ensure(gBuffer->getNumPoints() >= 318);
+            ensure(gBuffer->getNumPoints() >= std::size_t(318));
         }
     }
 
@@ -171,7 +175,7 @@
         ensure_not(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure(gBuffer->getNumPoints() >= 8);
+        ensure(gBuffer->getNumPoints() >= std::size_t(8));
     }
 
     template<>
@@ -194,7 +198,7 @@
         ensure_not(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure(gBuffer->getNumPoints() >= 51);
+        ensure(gBuffer->getNumPoints() >= std::size_t(51));
     }
 
     template<>
@@ -217,7 +221,7 @@
         ensure_not(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure(gBuffer->getNumPoints() >= 24);
+        ensure(gBuffer->getNumPoints() >= std::size_t(24));
     }
 
     template<>
@@ -240,7 +244,7 @@
         ensure_not(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure(gBuffer->getNumPoints() >= 7);
+        ensure(gBuffer->getNumPoints() >= std::size_t(7));
     }
 
     template<>
@@ -263,7 +267,7 @@
         ensure_not(gBuffer->isEmpty());
         ensure(gBuffer->isValid());
         ensure_equals(gBuffer->getGeometryTypeId(), geos::geom::GEOS_POLYGON);
-        ensure(gBuffer->getNumPoints() >= 5);
+        ensure(gBuffer->getNumPoints() >= std::size_t(5));
     }
 
 } // namespace tut



More information about the geos-commits mailing list