summaryrefslogtreecommitdiffstats
path: root/src/geos-1-fixes.patch
blob: f8eebc88fadf9b553b7bf8c80bf8ff017fcb8bd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
This file is part of mingw-cross-env.
See doc/index.html for further information.

Patches for GCC 4.6 compatibility.
Backported from 3 patches from this thread:
http://lists.osgeo.org/pipermail/geos-devel/2011-March/005156.html

From d63201ebcc9c6e186660a70973e2fb485fb2c681 Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Sat, 26 Mar 2011 10:13:26 +0100
Subject: [PATCH 1/3] fix missing size_t


diff --git a/source/headers/geos/geom/CoordinateArraySequenceFactory.h b/source/headers/geos/geom/CoordinateArraySequenceFactory.h
index 1f19e09..9bcf835 100644
--- a/source/headers/geos/geom/CoordinateArraySequenceFactory.h
+++ b/source/headers/geos/geom/CoordinateArraySequenceFactory.h
@@ -51,10 +51,10 @@ public:
 	 */
 	CoordinateSequence *create(std::vector<Coordinate> *coords) const;
 
-	CoordinateSequence *create(std::vector<Coordinate> *coords, size_t dims) const;
+	CoordinateSequence *create(std::vector<Coordinate> *coords, std::size_t dims) const;
 
    	/** @see CoordinateSequenceFactory::create(size_t, int) */
-	CoordinateSequence *create(size_t size, size_t dimension=3) const;
+	CoordinateSequence *create(std::size_t size, std::size_t dimension=3) const;
 
 	/** \brief
 	 * Returns the singleton instance of CoordinateArraySequenceFactory
diff --git a/source/headers/geos/geom/CoordinateSequence.h b/source/headers/geos/geom/CoordinateSequence.h
index fd1da03..c9f1277 100644
--- a/source/headers/geos/geom/CoordinateSequence.h
+++ b/source/headers/geos/geom/CoordinateSequence.h
@@ -95,7 +95,7 @@ public:
 	 * Coordinate or merely a copy depends on the implementation.
 	 */
 	//virtual const Coordinate& getCoordinate(int i) const=0;
-	virtual const Coordinate& getAt(size_t i) const=0;
+	virtual const Coordinate& getAt(std::size_t i) const=0;
 
 	/// Return last Coordinate in the sequence
 	const Coordinate& back() const {
diff --git a/source/headers/geos/geom/CoordinateSequenceFactory.h b/source/headers/geos/geom/CoordinateSequenceFactory.h
index 6441d94..50ddc48 100644
--- a/source/headers/geos/geom/CoordinateSequenceFactory.h
+++ b/source/headers/geos/geom/CoordinateSequenceFactory.h
@@ -75,8 +75,8 @@ public:
 	 * @param dimension the dimension of the coordinates in the sequence
 	 * 	(if user-specifiable, otherwise ignored)
 	 */
-	virtual CoordinateSequence *create(size_t size,
-			size_t dimension) const=0;
+	virtual CoordinateSequence *create(std::size_t size,
+			std::size_t dimension) const=0;
 
 	virtual ~CoordinateSequenceFactory();
 };
diff --git a/source/headers/geos/index/chain/MonotoneChainBuilder.h b/source/headers/geos/index/chain/MonotoneChainBuilder.h
index 7c27e83..e227559 100644
--- a/source/headers/geos/index/chain/MonotoneChainBuilder.h
+++ b/source/headers/geos/index/chain/MonotoneChainBuilder.h
@@ -97,8 +97,8 @@ private:
 	 *
 	 * NOTE: aborts if 'start' is >= pts.getSize()
 	 */
-	static size_t findChainEnd(const geom::CoordinateSequence& pts,
-	                                                   size_t start);
+	static std::size_t findChainEnd(const geom::CoordinateSequence& pts,
+	                                                   std::size_t start);
 };
 
 } // namespace geos::index::chain
diff --git a/source/headers/geos/planargraph/DirectedEdgeStar.h b/source/headers/geos/planargraph/DirectedEdgeStar.h
index cc36ca7..c15b0a0 100644
--- a/source/headers/geos/planargraph/DirectedEdgeStar.h
+++ b/source/headers/geos/planargraph/DirectedEdgeStar.h
@@ -86,7 +86,7 @@ public:
 	 * \brief Returns the number of edges around the Node associated
 	 * with this DirectedEdgeStar.
 	 */
-	size_t getDegree() const { return outEdges.size(); }
+	std::size_t getDegree() const { return outEdges.size(); }
 
 	/**
 	 * \brief Returns the coordinate for the node at wich this
diff --git a/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h b/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h
index 5dd0412..f6fd1ef 100644
--- a/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h
+++ b/source/headers/geos/simplify/DouglasPeuckerLineSimplifier.h
@@ -81,7 +81,7 @@ private:
 	BoolVectAutoPtr usePt;
 	double distanceTolerance;
 
-	void simplifySection(size_t i, size_t j);
+	void simplifySection(std::size_t i, std::size_t j);
 
     // Declare type as noncopyable
     DouglasPeuckerLineSimplifier(const DouglasPeuckerLineSimplifier& other);
diff --git a/source/headers/geos/simplify/TaggedLineString.h b/source/headers/geos/simplify/TaggedLineString.h
index 49af2ba..8078eb3 100644
--- a/source/headers/geos/simplify/TaggedLineString.h
+++ b/source/headers/geos/simplify/TaggedLineString.h
@@ -66,11 +66,11 @@ public:
 	typedef std::auto_ptr<geom::CoordinateSequence> CoordSeqPtr;
 
 	TaggedLineString(const geom::LineString* nParentLine,
-			size_t minimumSize=2);
+			std::size_t minimumSize=2);
 
 	~TaggedLineString();
 
-	size_t getMinimumSize() const;
+	std::size_t getMinimumSize() const;
 
 	const geom::LineString* getParent() const;
 
@@ -78,11 +78,11 @@ public:
 
 	CoordSeqPtr getResultCoordinates() const;
 
-	size_t getResultSize() const;
+	std::size_t getResultSize() const;
 
-	TaggedLineSegment* getSegment(size_t);
+	TaggedLineSegment* getSegment(std::size_t x);
 
-	const TaggedLineSegment* getSegment(size_t) const;
+	const TaggedLineSegment* getSegment(std::size_t x) const;
 
 	std::vector<TaggedLineSegment*>& getSegments();
 
@@ -104,7 +104,7 @@ private:
 	// TaggedLineSegments owned by this object
 	std::vector<TaggedLineSegment*> resultSegs;
 
-	size_t minimumSize;
+	std::size_t minimumSize;
 
 	void init();
 
diff --git a/source/headers/geos/simplify/TaggedLineStringSimplifier.h b/source/headers/geos/simplify/TaggedLineStringSimplifier.h
index 8ab8507..e54f3e5 100644
--- a/source/headers/geos/simplify/TaggedLineStringSimplifier.h
+++ b/source/headers/geos/simplify/TaggedLineStringSimplifier.h
@@ -92,20 +92,20 @@ private:
 
 	double distanceTolerance;
 
-	void simplifySection(size_t i, size_t j,
-			size_t depth);
+	void simplifySection(std::size_t i, std::size_t j,
+			std::size_t depth);
 
-	static size_t findFurthestPoint(
+	static std::size_t findFurthestPoint(
 			const geom::CoordinateSequence* pts,
-			size_t i, size_t j,
+			std::size_t i, std::size_t j,
 			double& maxDistance);
 
 	bool hasBadIntersection(const TaggedLineString* parentLine,
-                       const std::vector<size_t>& sectionIndex,
+                       const std::vector<std::size_t>& sectionIndex,
                        const geom::LineSegment& candidateSeg);
 
 	bool hasBadInputIntersection(const TaggedLineString* parentLine,
-                       const std::vector<size_t>& sectionIndex,
+                       const std::vector<std::size_t>& sectionIndex,
                        const geom::LineSegment& candidateSeg);
 
 	bool hasBadOutputIntersection(const geom::LineSegment& candidateSeg);
@@ -114,7 +114,7 @@ private:
 			const geom::LineSegment& seg1) const;
 
 	std::auto_ptr<TaggedLineSegment> flatten(
-			size_t start, size_t end);
+			std::size_t start, std::size_t end);
 
 	/** \brief
 	 * Tests whether a segment is in a section of a TaggedLineString
@@ -126,7 +126,7 @@ private:
 	 */
 	static bool isInLineSection(
 		const TaggedLineString* parentLine,
-		const std::vector<size_t>& sectionIndex,
+		const std::vector<std::size_t>& sectionIndex,
 		const TaggedLineSegment* seg);
 
 	/** \brief
@@ -138,8 +138,8 @@ private:
 	 * @param sectionEndIndex
 	 */
 	void remove(const TaggedLineString* line,
-			size_t start,
-			size_t end);
+			std::size_t start,
+			std::size_t end);
  
 };
 
diff --git a/source/index/chain/MonotoneChainBuilder.cpp b/source/index/chain/MonotoneChainBuilder.cpp
index 8448431..4dcc571 100644
--- a/source/index/chain/MonotoneChainBuilder.cpp
+++ b/source/index/chain/MonotoneChainBuilder.cpp
@@ -56,13 +56,13 @@ void
 MonotoneChainBuilder::getChains(const CoordinateSequence* pts, void* context,
                                 vector<MonotoneChain*>& mcList)
 {
-	vector<size_t> startIndex;
+	vector<std::size_t> startIndex;
 	getChainStartIndices(*pts, startIndex);
-	size_t nindexes = startIndex.size();
+	std::size_t nindexes = startIndex.size();
 	if (nindexes > 0)
 	{
-		size_t n = nindexes - 1;
-		for(size_t i = 0; i < n; i++)
+		std::size_t n = nindexes - 1;
+		for(std::size_t i = 0; i < n; i++)
 		{
 			MonotoneChain* mc = new MonotoneChain(*pts, startIndex[i], startIndex[i+1], context);
 			mcList.push_back(mc);
@@ -73,16 +73,16 @@ MonotoneChainBuilder::getChains(const CoordinateSequence* pts, void* context,
 /* static public */
 void
 MonotoneChainBuilder::getChainStartIndices(const CoordinateSequence& pts,
-                                           vector<size_t>& startIndexList)
+                                           vector<std::size_t>& startIndexList)
 {
 	// find the startpoint (and endpoints) of all monotone chains
 	// in this edge
-	size_t start = 0;
+	std::size_t start = 0;
 	startIndexList.push_back(start);
-	const size_t n = pts.getSize() - 1;
+	const std::size_t n = pts.getSize() - 1;
 	do
 	{
-		size_t last = findChainEnd(pts, start);
+		std::size_t last = findChainEnd(pts, start);
 		startIndexList.push_back(last);
 		start = last;
 	} while (start < n);
@@ -90,17 +90,17 @@ MonotoneChainBuilder::getChainStartIndices(const CoordinateSequence& pts,
 }
 
 /* private static */
-size_t
-MonotoneChainBuilder::findChainEnd(const CoordinateSequence& pts, size_t start)
+std::size_t
+MonotoneChainBuilder::findChainEnd(const CoordinateSequence& pts, std::size_t start)
 {
 
-	const size_t npts = pts.getSize(); // cache
+	const std::size_t npts = pts.getSize(); // cache
 
 	assert(start < npts);
 	assert(npts); // should be implied by the assertion above,
 	              // 'start' being unsigned
 
-	size_t safeStart = start;
+	std::size_t safeStart = start;
 
         // skip any zero-length segments at the start of the sequence
         // (since they cannot be used to establish a quadrant)
@@ -119,7 +119,7 @@ MonotoneChainBuilder::findChainEnd(const CoordinateSequence& pts, size_t start)
 	// (which is the starting quadrant)
 	int chainQuad = Quadrant::quadrant(pts[safeStart],
 	                                   pts[safeStart + 1]);
-	size_t last = start + 1;
+	std::size_t last = start + 1;
 	while (last < npts)
 	{
 		// skip zero-length segments, but include them in the chain
diff --git a/source/simplify/DouglasPeuckerLineSimplifier.cpp b/source/simplify/DouglasPeuckerLineSimplifier.cpp
index 29761c2..67cbae9 100644
--- a/source/simplify/DouglasPeuckerLineSimplifier.cpp
+++ b/source/simplify/DouglasPeuckerLineSimplifier.cpp
@@ -68,7 +68,7 @@ DouglasPeuckerLineSimplifier::simplify()
 	usePt = BoolVectAutoPtr(new BoolVect(pts.size(), true));
 	simplifySection(0, pts.size() - 1);
 
-	for (size_t i=0, n=pts.size(); i<n; ++i)
+	for (std::size_t i=0, n=pts.size(); i<n; ++i)
 	{
 		if ( usePt->operator[](i) )
 		{
@@ -84,17 +84,17 @@ DouglasPeuckerLineSimplifier::simplify()
 /*private*/
 void
 DouglasPeuckerLineSimplifier::simplifySection(
-		size_t i,
-		size_t j)
+		std::size_t i,
+		std::size_t j)
 {
 	if ( (i+1) == j ) return;
 
 	geos::geom::LineSegment seg(pts[i], pts[j]);
 	double maxDistance = -1.0;
 
-	size_t maxIndex = i;
+	std::size_t maxIndex = i;
 
-	for (size_t k=i+1; k<j; k++)
+	for (std::size_t k=i+1; k<j; k++)
 	{
 		double distance = seg.distance(pts[k]);
 		if (distance > maxDistance) {
@@ -103,7 +103,7 @@ DouglasPeuckerLineSimplifier::simplifySection(
 		}
 	}
 	if (maxDistance <= distanceTolerance) {
-		for(size_t k =i+1; k<j; k++)
+		for(std::size_t k =i+1; k<j; k++)
 		{
 			usePt->operator[](k) = false;
 		}
diff --git a/source/simplify/TaggedLineString.cpp b/source/simplify/TaggedLineString.cpp
index 3d1fcbc..bbf3c9d 100644
--- a/source/simplify/TaggedLineString.cpp
+++ b/source/simplify/TaggedLineString.cpp
@@ -44,7 +44,7 @@ namespace simplify { // geos::simplify
 
 /*public*/
 TaggedLineString::TaggedLineString(const geom::LineString* nParentLine,
-			size_t nMinimumSize)
+			std::size_t nMinimumSize)
 	:
 	parentLine(nParentLine),
 	minimumSize(nMinimumSize)
@@ -60,10 +60,10 @@ TaggedLineString::~TaggedLineString()
 	     << endl;
 #endif
 
-	for (size_t i=0, n=segs.size(); i<n; i++)
+	for (std::size_t i=0, n=segs.size(); i<n; i++)
 		delete segs[i];
 
-	for (size_t i=0, n=resultSegs.size(); i<n; i++)
+	for (std::size_t i=0, n=resultSegs.size(); i<n; i++)
 		delete resultSegs[i];
 }
 
@@ -81,7 +81,7 @@ TaggedLineString::init()
 
 	segs.reserve(pts->size()-1);
 
-	for (size_t i=0, n=pts->size()-1; i<n; i++)
+	for (std::size_t i=0, n=pts->size()-1; i<n; i++)
 	{
 		TaggedLineSegment* seg = new TaggedLineSegment(
 				pts->getAt(i),
@@ -100,7 +100,7 @@ TaggedLineString::init()
 }
 
 /*public*/
-size_t
+std::size_t
 TaggedLineString::getMinimumSize() const
 {
 	return minimumSize;
@@ -155,7 +155,7 @@ TaggedLineString::extractCoordinates(
 	cerr << __FUNCTION__ << " segs.size: " << segs.size() << endl;
 #endif
 
-	size_t i=0, size=segs.size();
+	std::size_t i=0, size=segs.size();
 
 	assert(size);
 
@@ -173,7 +173,7 @@ TaggedLineString::extractCoordinates(
 }
 
 /*public*/
-size_t
+std::size_t
 TaggedLineString::getResultSize() const
 {
 	unsigned resultSegsSize = resultSegs.size();
@@ -182,14 +182,14 @@ TaggedLineString::getResultSize() const
 
 /*public*/
 TaggedLineSegment*
-TaggedLineString::getSegment(size_t i) 
+TaggedLineString::getSegment(std::size_t i) 
 {
 	return segs[i];
 }
 
 /*public*/
 const TaggedLineSegment*
-TaggedLineString::getSegment(size_t i) const
+TaggedLineString::getSegment(std::size_t i) const
 {
 	return segs[i];
 }
diff --git a/source/simplify/TaggedLineStringSimplifier.cpp b/source/simplify/TaggedLineStringSimplifier.cpp
index 5981b7a..025e41d 100644
--- a/source/simplify/TaggedLineStringSimplifier.cpp
+++ b/source/simplify/TaggedLineStringSimplifier.cpp
@@ -83,8 +83,8 @@ TaggedLineStringSimplifier::simplify(TaggedLineString* nLine)
 
 /*private*/
 void
-TaggedLineStringSimplifier::simplifySection(size_t i,
-		size_t j, size_t depth)
+TaggedLineStringSimplifier::simplifySection(std::size_t i,
+		std::size_t j, std::size_t depth)
 {
 	depth += 1;
 
@@ -94,7 +94,7 @@ TaggedLineStringSimplifier::simplifySection(size_t i,
 	          << std::endl;
 #endif
 
-	vector<size_t> sectionIndex(2);
+	vector<std::size_t> sectionIndex(2);
 
 	if((i+1) == j)
 	{
@@ -124,7 +124,7 @@ TaggedLineStringSimplifier::simplifySection(size_t i,
 	 */
 	if (line->getResultSize() < line->getMinimumSize())
 	{
-		size_t worstCaseSize = depth + 1;
+		std::size_t worstCaseSize = depth + 1;
 		if (worstCaseSize < line->getMinimumSize())
 			isValidToSimplify = false;
 	}
@@ -132,7 +132,7 @@ TaggedLineStringSimplifier::simplifySection(size_t i,
 	double distance;
 
 	// pass distance by ref
-	size_t furthestPtIndex = findFurthestPoint(linePts, i, j, distance);
+	std::size_t furthestPtIndex = findFurthestPoint(linePts, i, j, distance);
 
 #if GEOS_DEBUG
 	std::cerr << "furthest point " << furthestPtIndex 
@@ -176,7 +176,7 @@ TaggedLineStringSimplifier::simplifySection(size_t i,
 
 /*private*/
 auto_ptr<TaggedLineSegment>
-TaggedLineStringSimplifier::flatten(size_t start, size_t end)
+TaggedLineStringSimplifier::flatten(std::size_t start, std::size_t end)
 {
 	// make a new segment for the simplified geometry
 	const Coordinate& p0 = linePts->getAt(start);
@@ -192,7 +192,7 @@ TaggedLineStringSimplifier::flatten(size_t start, size_t end)
 bool
 TaggedLineStringSimplifier::hasBadIntersection(
 		const TaggedLineString* parentLine,
-		const vector<size_t>& sectionIndex,
+		const vector<std::size_t>& sectionIndex,
 		const LineSegment& candidateSeg)
 {
 	if (hasBadOutputIntersection(candidateSeg))
@@ -242,7 +242,7 @@ TaggedLineStringSimplifier::hasInteriorIntersection(
 bool
 TaggedLineStringSimplifier::hasBadInputIntersection(
 		const TaggedLineString* parentLine,
-		const vector<size_t>& sectionIndex,
+		const vector<std::size_t>& sectionIndex,
 		const LineSegment& candidateSeg)
 {
 	auto_ptr< vector<LineSegment*> > querySegs =
@@ -278,14 +278,14 @@ TaggedLineStringSimplifier::hasBadInputIntersection(
 bool
 TaggedLineStringSimplifier::isInLineSection(
 		const TaggedLineString* line,
-		const vector<size_t>& sectionIndex,
+		const vector<std::size_t>& sectionIndex,
 		const TaggedLineSegment* seg)
 {
 	// not in this line
 	if (seg->getParent() != line->getParent())
 		return false;
 
-	size_t segIndex = seg->getIndex();
+	std::size_t segIndex = seg->getIndex();
 	if (segIndex >= sectionIndex[0] && segIndex < sectionIndex[1])
 		return true;
 
@@ -295,13 +295,13 @@ TaggedLineStringSimplifier::isInLineSection(
 /*private*/
 void
 TaggedLineStringSimplifier::remove(const TaggedLineString* line,
-		size_t start,
-		size_t end)
+		std::size_t start,
+		std::size_t end)
 {
 	assert(end <= line->getSegments().size() );
 	assert(start < end); // I'm not sure this should always be true
 
-	for (size_t i = start; i < end; i++)
+	for (std::size_t i = start; i < end; i++)
 	{
 		const TaggedLineSegment* seg = line->getSegment(i);
 		inputIndex->remove(seg);
@@ -309,10 +309,10 @@ TaggedLineStringSimplifier::remove(const TaggedLineString* line,
 }
 
 /*private static*/
-size_t
+std::size_t
 TaggedLineStringSimplifier::findFurthestPoint(
 		const geom::CoordinateSequence* pts,
-		size_t i, size_t j,
+		std::size_t i, std::size_t j,
 		double& maxDistance)
 {
 	LineSegment seg(pts->getAt(i), pts->getAt(j));
@@ -321,8 +321,8 @@ TaggedLineStringSimplifier::findFurthestPoint(
 	          << std::endl;
 #endif
 	double maxDist = -1.0;
-	size_t maxIndex = i;
-	for (size_t k = i + 1; k < j; k++)
+	std::size_t maxIndex = i;
+	for (std::size_t k = i + 1; k < j; k++)
 	{
 		const Coordinate& midPt = pts->getAt(k);
 		double distance = seg.distance(midPt);
-- 
1.7.4.1


From bc687db602e42b4620ec9605db89ad49ee1951bb Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Sat, 26 Mar 2011 10:23:03 +0100
Subject: [PATCH 2/3] fix missing NULL


diff --git a/source/headers/geos/index/chain/MonotoneChainBuilder.h b/source/headers/geos/index/chain/MonotoneChainBuilder.h
index e227559..3cd11e6 100644
--- a/source/headers/geos/index/chain/MonotoneChainBuilder.h
+++ b/source/headers/geos/index/chain/MonotoneChainBuilder.h
@@ -22,6 +22,7 @@
 
 #include <geos/export.h>
 #include <vector>
+#include <cstddef>
 
 // Forward declarations
 namespace geos {
diff --git a/source/headers/geos/operation/valid/SimpleNestedRingTester.h b/source/headers/geos/operation/valid/SimpleNestedRingTester.h
index b8888ac..d9436ff 100644
--- a/source/headers/geos/operation/valid/SimpleNestedRingTester.h
+++ b/source/headers/geos/operation/valid/SimpleNestedRingTester.h
@@ -23,6 +23,7 @@
 
 #include <geos/export.h>
 
+#include <cstddef>
 #include <vector>
 
 // Forward declarations
diff --git a/source/index/bintree/Bintree.cpp b/source/index/bintree/Bintree.cpp
index 66a5ebc..3bd9ce1 100644
--- a/source/index/bintree/Bintree.cpp
+++ b/source/index/bintree/Bintree.cpp
@@ -14,6 +14,7 @@
  *
  **********************************************************************/
 
+#include <cstddef>
 #include <geos/index/bintree/Bintree.h>
 #include <geos/index/bintree/Root.h>
 #include <geos/index/bintree/Interval.h>
diff --git a/source/index/bintree/Node.cpp b/source/index/bintree/Node.cpp
index a879bc9..59bd95d 100644
--- a/source/index/bintree/Node.cpp
+++ b/source/index/bintree/Node.cpp
@@ -14,6 +14,7 @@
  *
  **********************************************************************/
 
+#include <cstddef>
 #include <cassert>
 
 #include <geos/index/bintree/Node.h>
diff --git a/source/index/bintree/Root.cpp b/source/index/bintree/Root.cpp
index 0f2de89..b3419c5 100644
--- a/source/index/bintree/Root.cpp
+++ b/source/index/bintree/Root.cpp
@@ -19,6 +19,7 @@
 #include <geos/index/bintree/Interval.h>
 #include <geos/index/quadtree/IntervalSize.h>
 
+#include <cstddef>
 #include <cassert>
 
 namespace geos {
diff --git a/source/index/strtree/AbstractNode.cpp b/source/index/strtree/AbstractNode.cpp
index bd07cf4..00267d0 100644
--- a/source/index/strtree/AbstractNode.cpp
+++ b/source/index/strtree/AbstractNode.cpp
@@ -17,6 +17,7 @@
 #include <geos/index/strtree/AbstractNode.h>
 
 #include <vector>
+#include <cstddef>
 #include <cassert>
 
 using namespace std;
-- 
1.7.4.1


From febd67da3fdf6afa19b33bf50b544b4fa911f4b9 Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Sat, 26 Mar 2011 10:53:53 +0100
Subject: [PATCH 3/3] fix uninitialized const caused by missing constructor


diff --git a/source/headers/geos/operation/overlay/OverlayNodeFactory.h b/source/headers/geos/operation/overlay/OverlayNodeFactory.h
index 12fb81c..186c9b2 100644
--- a/source/headers/geos/operation/overlay/OverlayNodeFactory.h
+++ b/source/headers/geos/operation/overlay/OverlayNodeFactory.h
@@ -46,6 +46,7 @@ namespace overlay { // geos::operation::overlay
  */
 class GEOS_DLL OverlayNodeFactory: public geomgraph::NodeFactory {
 public:
+	OverlayNodeFactory():geomgraph::NodeFactory() {}
 	geomgraph::Node* createNode(const geom::Coordinate &coord) const;
 	static const geomgraph::NodeFactory &instance();
 };
-- 
1.7.4.1