Skip to content

Commit 4b622de

Browse files
author
jef
committedMar 11, 2008
fix msvc warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk@8206 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 13fafbb commit 4b622de

File tree

3 files changed

+37
-6
lines changed

3 files changed

+37
-6
lines changed
 

‎src/core/qgsgeometry.cpp

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ QgsGeometry* QgsGeometry::fromPoint(const QgsPoint& point)
150150
{
151151
#if GEOS_VERSION_MAJOR < 3
152152
delete e;
153+
#else
154+
UNUSED(e);
153155
#endif
154156
return 0;
155157
}
@@ -175,6 +177,8 @@ QgsGeometry* QgsGeometry::fromMultiPoint(const QgsMultiPoint& multipoint)
175177
{
176178
#if GEOS_VERSION_MAJOR < 3
177179
delete e;
180+
#else
181+
UNUSED(e);
178182
#endif
179183
delete pointVector; return 0;
180184
}
@@ -189,6 +193,8 @@ QgsGeometry* QgsGeometry::fromMultiPoint(const QgsMultiPoint& multipoint)
189193
{
190194
#if GEOS_VERSION_MAJOR < 3
191195
delete e;
196+
#else
197+
UNUSED(e);
192198
#endif
193199
return 0;
194200
}
@@ -220,6 +226,8 @@ QgsGeometry* QgsGeometry::fromPolyline(const QgsPolyline& polyline)
220226
{
221227
#if GEOS_VERSION_MAJOR < 3
222228
delete e;
229+
#else
230+
UNUSED(e);
223231
#endif
224232
delete seq;
225233
return 0;
@@ -251,6 +259,8 @@ QgsGeometry* QgsGeometry::fromMultiPolyline(const QgsMultiPolyline& multiline)
251259
{
252260
#if GEOS_VERSION_MAJOR < 3
253261
delete e;
262+
#else
263+
UNUSED(e);
254264
#endif
255265
delete lineVector; delete seq;
256266
return 0;
@@ -267,6 +277,8 @@ QgsGeometry* QgsGeometry::fromMultiPolyline(const QgsMultiPolyline& multiline)
267277
{
268278
#if GEOS_VERSION_MAJOR < 3
269279
delete e;
280+
#else
281+
UNUSED(e);
270282
#endif
271283
return 0;
272284
}
@@ -304,6 +316,8 @@ static GEOS_GEOM::LinearRing* _createGeosLinearRing(const QgsPolyline& ring)
304316
{
305317
#if GEOS_VERSION_MAJOR < 3
306318
delete e;
319+
#else
320+
UNUSED(e);
307321
#endif
308322
return 0;
309323
}
@@ -338,6 +352,8 @@ QgsGeometry* QgsGeometry::fromPolygon(const QgsPolygon& polygon)
338352
{
339353
#if GEOS_VERSION_MAJOR < 3
340354
delete e;
355+
#else
356+
UNUSED(e);
341357
#endif
342358
return 0;
343359
}
@@ -374,6 +390,8 @@ QgsGeometry* QgsGeometry::fromMultiPolygon(const QgsMultiPolygon& multipoly)
374390
{
375391
#if GEOS_VERSION_MAJOR < 3
376392
delete e;
393+
#else
394+
UNUSED(e);
377395
#endif
378396
delete polygons; return 0;
379397
}
@@ -389,6 +407,8 @@ QgsGeometry* QgsGeometry::fromMultiPolygon(const QgsMultiPolygon& multipoly)
389407
{
390408
#if GEOS_VERSION_MAJOR < 3
391409
delete e;
410+
#else
411+
UNUSED(e);
392412
#endif
393413
return 0;
394414
}
@@ -2589,6 +2609,8 @@ int QgsGeometry::addRing(const QList<QgsPoint>& ring)
25892609
{
25902610
#if GEOS_VERSION_MAJOR < 3
25912611
delete e;
2612+
#else
2613+
UNUSED(e);
25922614
#endif
25932615
delete newSequence;
25942616
return 3;
@@ -2781,6 +2803,8 @@ int QgsGeometry::addIsland(const QList<QgsPoint>& ring)
27812803
{
27822804
#if GEOS_VERSION_MAJOR < 3
27832805
delete e;
2806+
#else
2807+
UNUSED(e);
27842808
#endif
27852809
delete newSequence;
27862810
return 2;
@@ -3022,6 +3046,8 @@ int QgsGeometry::splitGeometry(const QList<QgsPoint>& splitLine, QList<QgsGeomet
30223046
{
30233047
#if GEOS_VERSION_MAJOR < 3
30243048
delete e;
3049+
#else
3050+
UNUSED(e);
30253051
#endif
30263052
return 2;
30273053
}
@@ -3078,6 +3104,8 @@ int QgsGeometry::makeDifference(QgsGeometry* other)
30783104
{
30793105
#if GEOS_VERSION_MAJOR < 3
30803106
delete e;
3107+
#else
3108+
UNUSED(e);
30813109
#endif
30823110
return 5;
30833111
}
@@ -3973,6 +4001,8 @@ bool QgsGeometry::exportWkbToGeos()
39734001
{
39744002
#if GEOS_VERSION_MAJOR < 3
39754003
delete e;
4004+
#else
4005+
UNUSED(e);
39764006
#endif
39774007
return FALSE;
39784008
}
@@ -4278,7 +4308,7 @@ bool QgsGeometry::exportGeosToWkb()
42784308
//loop over lines
42794309
int lineType = QGis::WKBLineString;
42804310
GEOS_GEOM::CoordinateSequence* lineCoordinates = 0;
4281-
int lineSize;
4311+
GEOS_SIZE_T lineSize;
42824312
double x, y;
42834313

42844314
for(GEOS_SIZE_T i = 0; i < theMultiLineString->getNumGeometries(); ++i)
@@ -4837,7 +4867,7 @@ int QgsGeometry::mergeGeometriesMultiTypeSplit(QList<GEOS_GEOM::Geometry*>& spli
48374867
{
48384868
//is this geometry a part of the original multitype?
48394869
bool isPart = false;
4840-
for(int j = 0; j < collection->getNumGeometries(); ++j)
4870+
for(GEOS_SIZE_T j = 0; j < collection->getNumGeometries(); ++j)
48414871
{
48424872
if(copyList.at(i)->equals(collection->getGeometryN(j)))
48434873
{
@@ -5168,6 +5198,8 @@ QgsGeometry* QgsGeometry::Union(QgsGeometry* geometry)
51685198
{
51695199
#if GEOS_VERSION_MAJOR < 3
51705200
delete e;
5201+
#else
5202+
UNUSED(e);
51715203
#endif
51725204
//return this geometry if union not possible
51735205
return new QgsGeometry(*this);

‎src/core/qgsvectorlayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,15 +1720,15 @@ int QgsVectorLayer::splitFeatures(const QList<QgsPoint>& splitLine, bool topolog
17201720
return 1;
17211721
}
17221722

1723-
if(bBox.isEmpty())
1723+
if(bBox.isEmpty())
17241724
{
17251725
//if the bbox is a line, try to make a square out of it
1726-
if(!bBox.width() > 0.0 && bBox.height() > 0)
1726+
if(bBox.width()==0.0 && bBox.height() > 0)
17271727
{
17281728
bBox.setXmin(bBox.xMin() - bBox.height()/2);
17291729
bBox.setXmax(bBox.xMax() + bBox.height()/2);
17301730
}
1731-
else if(!bBox.height() > 0.0 && bBox.width() > 0)
1731+
else if(bBox.height()==0.0 && bBox.width()>0)
17321732
{
17331733
bBox.setYmin(bBox.yMin() - bBox.width()/2);
17341734
bBox.setYmax(bBox.yMax() + bBox.width()/2);

‎src/core/raster/qgscolorrampshader.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ bool QgsColorRampShader::getInterpolatedColor(double theValue, int* theReturnRed
131131

132132
void QgsColorRampShader::setColorRampType(QString theType)
133133
{
134-
switch(mColorRampType)
135134
if(theType == "INTERPOLATED")
136135
{
137136
mColorRampType = INTERPOLATED;

0 commit comments

Comments
 (0)
Please sign in to comment.