Skip to content

Commit

Permalink
Fix pedantic compile warnings due to signed int , unsigned in compari…
Browse files Browse the repository at this point in the history
…sons

git-svn-id: http://svn.osgeo.org/qgis/trunk@6898 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Apr 19, 2007
1 parent 5a4d23f commit 53b15d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/qgsgeometry.cpp
Expand Up @@ -1978,7 +1978,7 @@ double QgsGeometry::closestVertexWithContext(const QgsPoint& point,
GEOS_GEOM::CoordinateSequence* sequence = mGeos->getCoordinates();
if(sequence)
{
for(int i = 0; i < sequence->getSize(); ++i)
for(unsigned int i = 0; i < sequence->getSize(); ++i)
{
double testDist = point.sqrDist(sequence->getAt(i).x, sequence->getAt(i).y);
if(testDist < sqrDist)
Expand Down Expand Up @@ -3231,7 +3231,7 @@ bool QgsGeometry::exportGeosToWkb()
geometrySize += sizeof(int);
geometrySize += theRing->getNumPoints()*2*sizeof(double);
}
for(int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
for(unsigned int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
{
geometrySize += sizeof(int); //number of points in ring
theRing = thePolygon->getInteriorRingN(i);
Expand Down Expand Up @@ -3265,7 +3265,7 @@ bool QgsGeometry::exportGeosToWkb()
position += sizeof(int);
const GEOS_GEOM::CoordinateSequence* ringSequence = theRing->getCoordinatesRO();
//for(int j = 0; j < nPointsInRing; ++j)
for(int j = 0; j <ringSequence->getSize(); ++j)
for(unsigned int j = 0; j <ringSequence->getSize(); ++j)
{
//x = theRing->getPointN(j)->getX();
x = ringSequence->getAt(j).x;
Expand All @@ -3279,7 +3279,7 @@ bool QgsGeometry::exportGeosToWkb()
}

//interior rings after
for(int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
for(unsigned int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
{
theRing = thePolygon->getInteriorRingN(i);
if(theRing)
Expand Down

0 comments on commit 53b15d7

Please sign in to comment.