[geos-commits] r3717 - in branches/3.2/source: headers/geos/geom headers/geos/index/chain headers/geos/operation/valid headers/geos/planargraph headers/geos/simplify index/bintree index/strtree

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Sep 17 01:40:43 PDT 2012


Author: strk
Date: 2012-09-17 01:40:42 -0700 (Mon, 17 Sep 2012)
New Revision: 3717

Modified:
   branches/3.2/source/headers/geos/geom/CoordinateSequenceFactory.h
   branches/3.2/source/headers/geos/index/chain/MonotoneChainBuilder.h
   branches/3.2/source/headers/geos/operation/valid/SimpleNestedRingTester.h
   branches/3.2/source/headers/geos/planargraph/DirectedEdgeStar.h
   branches/3.2/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h
   branches/3.2/source/headers/geos/simplify/TaggedLineString.h
   branches/3.2/source/headers/geos/simplify/TaggedLineStringSimplifier.h
   branches/3.2/source/index/bintree/Bintree.cpp
   branches/3.2/source/index/bintree/Node.cpp
   branches/3.2/source/index/bintree/Root.cpp
   branches/3.2/source/index/strtree/AbstractNode.cpp
Log:
Fix build with gcc 4.6, adding stdlib includes (#592)

Modified: branches/3.2/source/headers/geos/geom/CoordinateSequenceFactory.h
===================================================================
--- branches/3.2/source/headers/geos/geom/CoordinateSequenceFactory.h	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/headers/geos/geom/CoordinateSequenceFactory.h	2012-09-17 08:40:42 UTC (rev 3717)
@@ -23,6 +23,7 @@
 
 #include <geos/export.h>
 #include <vector>
+#include <cstdlib> // for size_t
 
 //#include <geos/geom/Coordinate.h>
 #include <geos/inline.h>

Modified: branches/3.2/source/headers/geos/index/chain/MonotoneChainBuilder.h
===================================================================
--- branches/3.2/source/headers/geos/index/chain/MonotoneChainBuilder.h	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/headers/geos/index/chain/MonotoneChainBuilder.h	2012-09-17 08:40:42 UTC (rev 3717)
@@ -22,6 +22,7 @@
 
 #include <geos/export.h>
 #include <vector>
+#include <cstdlib> // for size_t and NULL
 
 // Forward declarations
 namespace geos {

Modified: branches/3.2/source/headers/geos/operation/valid/SimpleNestedRingTester.h
===================================================================
--- branches/3.2/source/headers/geos/operation/valid/SimpleNestedRingTester.h	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/headers/geos/operation/valid/SimpleNestedRingTester.h	2012-09-17 08:40:42 UTC (rev 3717)
@@ -56,7 +56,7 @@
 		:
 		graph(newGraph),
 		rings(),
-		nestedPt(NULL)
+		nestedPt(0)
 	{}
 
 	~SimpleNestedRingTester() {
@@ -67,7 +67,7 @@
 	}
 
 	/*
-	 * Be aware that the returned Coordinate (if != NULL)
+	 * Be aware that the returned Coordinate (if != 0)
 	 * will point to storage owned by one of the LinearRing
 	 * previously added. If you destroy them, this
 	 * will point to an invalid memory address.

Modified: branches/3.2/source/headers/geos/planargraph/DirectedEdgeStar.h
===================================================================
--- branches/3.2/source/headers/geos/planargraph/DirectedEdgeStar.h	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/headers/geos/planargraph/DirectedEdgeStar.h	2012-09-17 08:40:42 UTC (rev 3717)
@@ -20,6 +20,7 @@
 #include <geos/export.h>
 
 #include <vector>
+#include <cstdlib> // for size_t
 
 // Forward declarations
 namespace geos {

Modified: branches/3.2/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h
===================================================================
--- branches/3.2/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h	2012-09-17 08:40:42 UTC (rev 3717)
@@ -23,6 +23,7 @@
 #include <geos/export.h>
 #include <vector>
 #include <memory> // for auto_ptr
+#include <cstdlib> // for size_t
 
 // Forward declarations
 namespace geos {

Modified: branches/3.2/source/headers/geos/simplify/TaggedLineString.h
===================================================================
--- branches/3.2/source/headers/geos/simplify/TaggedLineString.h	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/headers/geos/simplify/TaggedLineString.h	2012-09-17 08:40:42 UTC (rev 3717)
@@ -29,6 +29,7 @@
 #include <geos/export.h>
 #include <vector>
 #include <memory>
+#include <cstdlib> // for size_t
 
 // Forward declarations
 namespace geos {

Modified: branches/3.2/source/headers/geos/simplify/TaggedLineStringSimplifier.h
===================================================================
--- branches/3.2/source/headers/geos/simplify/TaggedLineStringSimplifier.h	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/headers/geos/simplify/TaggedLineStringSimplifier.h	2012-09-17 08:40:42 UTC (rev 3717)
@@ -28,6 +28,7 @@
 #include <geos/export.h>
 #include <vector>
 #include <memory>
+#include <cstdlib>
 
 // Forward declarations
 namespace geos {

Modified: branches/3.2/source/index/bintree/Bintree.cpp
===================================================================
--- branches/3.2/source/index/bintree/Bintree.cpp	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/index/bintree/Bintree.cpp	2012-09-17 08:40:42 UTC (rev 3717)
@@ -66,14 +66,14 @@
 int
 Bintree::depth()
 {
-	if (root!=NULL) return root->depth();
+	if (root!=0) return root->depth();
 	return 0;
 }
 
 int
 Bintree::size()
 {
-	if (root!=NULL) return root->size();
+	if (root!=0) return root->size();
 	return 0;
 }
 
@@ -85,7 +85,7 @@
 int
 Bintree::nodeSize()
 {
-	if (root!=NULL) return root->nodeSize();
+	if (root!=0) return root->nodeSize();
 	return 0;
 }
 

Modified: branches/3.2/source/index/bintree/Node.cpp
===================================================================
--- branches/3.2/source/index/bintree/Node.cpp	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/index/bintree/Node.cpp	2012-09-17 08:40:42 UTC (rev 3717)
@@ -38,9 +38,9 @@
 Node::createExpanded(Node *node,Interval *addInterval)
 {
 	Interval *expandInt=new Interval(addInterval);
-	if (node!=NULL) expandInt->expandToInclude(node->interval);
+	if (node!=0) expandInt->expandToInclude(node->interval);
 	Node *largerNode=createNode(expandInt);
-	if (node!=NULL) largerNode->insert(node);
+	if (node!=0) largerNode->insert(node);
 	delete expandInt;
 	return largerNode;
 }
@@ -99,7 +99,7 @@
 	int subnodeIndex=getSubnodeIndex(searchInterval,centre);
 	if (subnodeIndex==-1)
 		return this;
-	if (subnode[subnodeIndex]!=NULL) {
+	if (subnode[subnodeIndex]!=0) {
 		// query lies in subnode, so search it
 		Node *node=subnode[subnodeIndex];
 		return node->find(searchInterval);
@@ -111,7 +111,7 @@
 void
 Node::insert(Node *node)
 {
-	assert(interval==NULL || interval->contains(node->interval));
+	assert(interval==0 || interval->contains(node->interval));
 	int index=getSubnodeIndex(node->interval,centre);
 	if (node->level==level-1) {
 		subnode[index]=node;
@@ -131,7 +131,7 @@
 Node*
 Node::getSubnode(int index)
 {
-	if (subnode[index]==NULL) {
+	if (subnode[index]==0) {
 		subnode[index]=createSubnode(index);
 	}
 	return subnode[index];

Modified: branches/3.2/source/index/bintree/Root.cpp
===================================================================
--- branches/3.2/source/index/bintree/Root.cpp	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/index/bintree/Root.cpp	2012-09-17 08:40:42 UTC (rev 3717)
@@ -47,7 +47,7 @@
 	 *  If the subnode doesn't exist or this item is not contained in it,
 	 *  have to expand the tree upward to contain the item.
 	 */
-	if (node==NULL || !node->getInterval()->contains(itemInterval))
+	if (node==0 || !node->getInterval()->contains(itemInterval))
 	{
 		Node* largerNode=Node::createExpanded(node,itemInterval);
 //		delete subnode[index];

Modified: branches/3.2/source/index/strtree/AbstractNode.cpp
===================================================================
--- branches/3.2/source/index/strtree/AbstractNode.cpp	2012-09-10 10:34:13 UTC (rev 3716)
+++ branches/3.2/source/index/strtree/AbstractNode.cpp	2012-09-17 08:40:42 UTC (rev 3717)
@@ -32,7 +32,7 @@
  */
 AbstractNode::AbstractNode(int newLevel, int capacity) {
 	childBoundables.reserve(capacity);
-	bounds=NULL;
+	bounds=0;
 	level=newLevel;
 }
 
@@ -42,7 +42,7 @@
 const void *
 AbstractNode::getBounds() const
 {
-	if (bounds==NULL) {
+	if (bounds==0) {
 		bounds = computeBounds();
 	}
 	return bounds;
@@ -61,7 +61,7 @@
  * (wrapped in an ItemBoundable)
  */
 void AbstractNode::addChildBoundable(Boundable *childBoundable) {
-	assert(bounds==NULL);
+	assert(bounds==0);
 	childBoundables.push_back(childBoundable);
 }
 



More information about the geos-commits mailing list