Skip to content

Commit

Permalink
fix msvc warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8206 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 11, 2008
1 parent a45bf79 commit d9615df
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
36 changes: 34 additions & 2 deletions src/core/qgsgeometry.cpp
Expand Up @@ -150,6 +150,8 @@ QgsGeometry* QgsGeometry::fromPoint(const QgsPoint& point)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 0;
}
Expand All @@ -175,6 +177,8 @@ QgsGeometry* QgsGeometry::fromMultiPoint(const QgsMultiPoint& multipoint)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
delete pointVector; return 0;
}
Expand All @@ -189,6 +193,8 @@ QgsGeometry* QgsGeometry::fromMultiPoint(const QgsMultiPoint& multipoint)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 0;
}
Expand Down Expand Up @@ -220,6 +226,8 @@ QgsGeometry* QgsGeometry::fromPolyline(const QgsPolyline& polyline)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
delete seq;
return 0;
Expand Down Expand Up @@ -251,6 +259,8 @@ QgsGeometry* QgsGeometry::fromMultiPolyline(const QgsMultiPolyline& multiline)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
delete lineVector; delete seq;
return 0;
Expand All @@ -267,6 +277,8 @@ QgsGeometry* QgsGeometry::fromMultiPolyline(const QgsMultiPolyline& multiline)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 0;
}
Expand Down Expand Up @@ -304,6 +316,8 @@ static GEOS_GEOM::LinearRing* _createGeosLinearRing(const QgsPolyline& ring)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 0;
}
Expand Down Expand Up @@ -338,6 +352,8 @@ QgsGeometry* QgsGeometry::fromPolygon(const QgsPolygon& polygon)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 0;
}
Expand Down Expand Up @@ -374,6 +390,8 @@ QgsGeometry* QgsGeometry::fromMultiPolygon(const QgsMultiPolygon& multipoly)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
delete polygons; return 0;
}
Expand All @@ -389,6 +407,8 @@ QgsGeometry* QgsGeometry::fromMultiPolygon(const QgsMultiPolygon& multipoly)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 0;
}
Expand Down Expand Up @@ -2589,6 +2609,8 @@ int QgsGeometry::addRing(const QList<QgsPoint>& ring)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
delete newSequence;
return 3;
Expand Down Expand Up @@ -2781,6 +2803,8 @@ int QgsGeometry::addIsland(const QList<QgsPoint>& ring)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
delete newSequence;
return 2;
Expand Down Expand Up @@ -3022,6 +3046,8 @@ int QgsGeometry::splitGeometry(const QList<QgsPoint>& splitLine, QList<QgsGeomet
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 2;
}
Expand Down Expand Up @@ -3078,6 +3104,8 @@ int QgsGeometry::makeDifference(QgsGeometry* other)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return 5;
}
Expand Down Expand Up @@ -3973,6 +4001,8 @@ bool QgsGeometry::exportWkbToGeos()
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
return FALSE;
}
Expand Down Expand Up @@ -4278,7 +4308,7 @@ bool QgsGeometry::exportGeosToWkb()
//loop over lines
int lineType = QGis::WKBLineString;
GEOS_GEOM::CoordinateSequence* lineCoordinates = 0;
int lineSize;
GEOS_SIZE_T lineSize;
double x, y;

for(GEOS_SIZE_T i = 0; i < theMultiLineString->getNumGeometries(); ++i)
Expand Down Expand Up @@ -4837,7 +4867,7 @@ int QgsGeometry::mergeGeometriesMultiTypeSplit(QList<GEOS_GEOM::Geometry*>& spli
{
//is this geometry a part of the original multitype?
bool isPart = false;
for(int j = 0; j < collection->getNumGeometries(); ++j)
for(GEOS_SIZE_T j = 0; j < collection->getNumGeometries(); ++j)
{
if(copyList.at(i)->equals(collection->getGeometryN(j)))
{
Expand Down Expand Up @@ -5168,6 +5198,8 @@ QgsGeometry* QgsGeometry::Union(QgsGeometry* geometry)
{
#if GEOS_VERSION_MAJOR < 3
delete e;
#else
UNUSED(e);
#endif
//return this geometry if union not possible
return new QgsGeometry(*this);
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -1720,15 +1720,15 @@ int QgsVectorLayer::splitFeatures(const QList<QgsPoint>& splitLine, bool topolog
return 1;
}

if(bBox.isEmpty())
if(bBox.isEmpty())
{
//if the bbox is a line, try to make a square out of it
if(!bBox.width() > 0.0 && bBox.height() > 0)
if(bBox.width()==0.0 && bBox.height() > 0)
{
bBox.setXmin(bBox.xMin() - bBox.height()/2);
bBox.setXmax(bBox.xMax() + bBox.height()/2);
}
else if(!bBox.height() > 0.0 && bBox.width() > 0)
else if(bBox.height()==0.0 && bBox.width()>0)
{
bBox.setYmin(bBox.yMin() - bBox.width()/2);
bBox.setYmax(bBox.yMax() + bBox.width()/2);
Expand Down
1 change: 0 additions & 1 deletion src/core/raster/qgscolorrampshader.cpp
Expand Up @@ -131,7 +131,6 @@ bool QgsColorRampShader::getInterpolatedColor(double theValue, int* theReturnRed

void QgsColorRampShader::setColorRampType(QString theType)
{
switch(mColorRampType)
if(theType == "INTERPOLATED")
{
mColorRampType = INTERPOLATED;
Expand Down

0 comments on commit d9615df

Please sign in to comment.