Skip to content

Commit 53b15d7

Browse files
author
timlinux
committedApr 19, 2007
Fix pedantic compile warnings due to signed int , unsigned in comparisons
git-svn-id: http://svn.osgeo.org/qgis/trunk@6898 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5a4d23f commit 53b15d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/core/qgsgeometry.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1978,7 +1978,7 @@ double QgsGeometry::closestVertexWithContext(const QgsPoint& point,
19781978
GEOS_GEOM::CoordinateSequence* sequence = mGeos->getCoordinates();
19791979
if(sequence)
19801980
{
1981-
for(int i = 0; i < sequence->getSize(); ++i)
1981+
for(unsigned int i = 0; i < sequence->getSize(); ++i)
19821982
{
19831983
double testDist = point.sqrDist(sequence->getAt(i).x, sequence->getAt(i).y);
19841984
if(testDist < sqrDist)
@@ -3231,7 +3231,7 @@ bool QgsGeometry::exportGeosToWkb()
32313231
geometrySize += sizeof(int);
32323232
geometrySize += theRing->getNumPoints()*2*sizeof(double);
32333233
}
3234-
for(int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
3234+
for(unsigned int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
32353235
{
32363236
geometrySize += sizeof(int); //number of points in ring
32373237
theRing = thePolygon->getInteriorRingN(i);
@@ -3265,7 +3265,7 @@ bool QgsGeometry::exportGeosToWkb()
32653265
position += sizeof(int);
32663266
const GEOS_GEOM::CoordinateSequence* ringSequence = theRing->getCoordinatesRO();
32673267
//for(int j = 0; j < nPointsInRing; ++j)
3268-
for(int j = 0; j <ringSequence->getSize(); ++j)
3268+
for(unsigned int j = 0; j <ringSequence->getSize(); ++j)
32693269
{
32703270
//x = theRing->getPointN(j)->getX();
32713271
x = ringSequence->getAt(j).x;
@@ -3279,7 +3279,7 @@ bool QgsGeometry::exportGeosToWkb()
32793279
}
32803280

32813281
//interior rings after
3282-
for(int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
3282+
for(unsigned int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
32833283
{
32843284
theRing = thePolygon->getInteriorRingN(i);
32853285
if(theRing)

0 commit comments

Comments
 (0)
Please sign in to comment.