Skip to content

Commit

Permalink
Tweak to r6898. It seems that some GEOS versions use 'int' and others…
Browse files Browse the repository at this point in the history
… 'unsigned int'

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6907 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Apr 20, 2007
1 parent 56024ce commit aba4b3c
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(unsigned int i = 0; i < sequence->getSize(); ++i)
for(int i = 0; i < (int) 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(unsigned int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
for(int i = 0; i < (int) 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(unsigned int j = 0; j <ringSequence->getSize(); ++j)
for(int j = 0; j < (int) 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(unsigned int i = 0; i < thePolygon->getNumInteriorRing(); ++i)
for(int i = 0; i < (int) thePolygon->getNumInteriorRing(); ++i)
{
theRing = thePolygon->getInteriorRingN(i);
if(theRing)
Expand Down

0 comments on commit aba4b3c

Please sign in to comment.