[QGIS Commit] r8206 - in trunk/qgis/src/core: . raster

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Mar 11 19:47:55 EDT 2008


Author: jef
Date: 2008-03-11 19:47:55 -0400 (Tue, 11 Mar 2008)
New Revision: 8206

Modified:
   trunk/qgis/src/core/qgsgeometry.cpp
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/src/core/raster/qgscolorrampshader.cpp
Log:
fix msvc warnings

Modified: trunk/qgis/src/core/qgsgeometry.cpp
===================================================================
--- trunk/qgis/src/core/qgsgeometry.cpp	2008-03-11 23:42:09 UTC (rev 8205)
+++ trunk/qgis/src/core/qgsgeometry.cpp	2008-03-11 23:47:55 UTC (rev 8206)
@@ -150,6 +150,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 0;
     }
@@ -175,6 +177,8 @@
 	{
 #if GEOS_VERSION_MAJOR < 3
 	  delete e;
+#else
+    UNUSED(e);
 #endif 
 	  delete pointVector; return 0;
 	}
@@ -189,6 +193,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 0;
     }
@@ -220,6 +226,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       delete seq;
       return 0;
@@ -251,6 +259,8 @@
 	{
 #if GEOS_VERSION_MAJOR < 3
 	  delete e;
+#else
+      UNUSED(e);
 #endif
 	  delete lineVector; delete seq;
 	  return 0;
@@ -267,6 +277,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 0;
     }
@@ -304,6 +316,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 0;
     }
@@ -338,6 +352,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 0;
     }
@@ -374,6 +390,8 @@
 	{
 #if GEOS_VERSION_MAJOR < 3
 	  delete e;
+#else
+    UNUSED(e);
 #endif
 	  delete polygons; return 0;
 	}
@@ -389,6 +407,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 0;
     }
@@ -2589,6 +2609,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       delete newSequence;
       return 3;
@@ -2781,6 +2803,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       delete newSequence;
       return 2;
@@ -3022,6 +3046,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 2;
     }
@@ -3078,6 +3104,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return 5;
     }
@@ -3973,6 +4001,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       return FALSE;
     }
@@ -4278,7 +4308,7 @@
 	//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)
@@ -4837,7 +4867,7 @@
     {
       //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)))
 	    {
@@ -5168,6 +5198,8 @@
     {
 #if GEOS_VERSION_MAJOR < 3
       delete e;
+#else
+      UNUSED(e);
 #endif
       //return this geometry if union not possible
       return new QgsGeometry(*this);

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2008-03-11 23:42:09 UTC (rev 8205)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2008-03-11 23:47:55 UTC (rev 8206)
@@ -1720,15 +1720,15 @@
 	  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);

Modified: trunk/qgis/src/core/raster/qgscolorrampshader.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgscolorrampshader.cpp	2008-03-11 23:42:09 UTC (rev 8205)
+++ trunk/qgis/src/core/raster/qgscolorrampshader.cpp	2008-03-11 23:47:55 UTC (rev 8206)
@@ -131,7 +131,6 @@
 
 void QgsColorRampShader::setColorRampType(QString theType)
 {
-  switch(mColorRampType)
   if(theType == "INTERPOLATED")
   {
     mColorRampType = INTERPOLATED;



More information about the QGIS-commit mailing list