[QGIS Commit] r10485 - in trunk/qgis/src: core core/pal
plugins/diagram_overlay
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Apr 6 08:52:57 EDT 2009
Author: jef
Date: 2009-04-06 08:52:56 -0400 (Mon, 06 Apr 2009)
New Revision: 10485
Modified:
trunk/qgis/src/core/pal/geomfunction.cpp
trunk/qgis/src/core/pal/layer.h
trunk/qgis/src/core/pal/pal.h
trunk/qgis/src/core/pal/problem.cpp
trunk/qgis/src/core/pal/util.cpp
trunk/qgis/src/core/pal/util.h
trunk/qgis/src/core/qgscentralpointpositionmanager.cpp
trunk/qgis/src/core/qgsoverlayobject.cpp
trunk/qgis/src/plugins/diagram_overlay/qgsbardiagramfactory.cpp
trunk/qgis/src/plugins/diagram_overlay/qgsdiagramrenderer.h
Log:
fix msvc build errors
Modified: trunk/qgis/src/core/pal/geomfunction.cpp
===================================================================
--- trunk/qgis/src/core/pal/geomfunction.cpp 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/pal/geomfunction.cpp 2009-04-06 12:52:56 UTC (rev 10485)
@@ -274,7 +274,7 @@
bool computeLineSegIntersection (double x1, double y1, double x2, double y2, // 1st line
double x3, double y3, double x4, double y4, // 2nd segment
double *x, double *y) {
- double cp1, cp2, cp3, cp4;
+ double cp1, cp2;
cp1 = cross_product (x1, y1, x2, y2, x3, y3);
cp2 = cross_product (x1, y1, x2, y2, x4, y4);
Modified: trunk/qgis/src/core/pal/layer.h
===================================================================
--- trunk/qgis/src/core/pal/layer.h 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/pal/layer.h 2009-04-06 12:52:56 UTC (rev 10485)
@@ -53,7 +53,7 @@
class Pal;
class SimpleMutex;
- struct Feat;
+ class Feat;
/**
* \brief A layer of spacial entites
Modified: trunk/qgis/src/core/pal/pal.h
===================================================================
--- trunk/qgis/src/core/pal/pal.h 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/pal/pal.h 2009-04-06 12:52:56 UTC (rev 10485)
@@ -40,6 +40,9 @@
#include <list>
#include <iostream>
+#ifdef _MSC_VER
+#include <time.h>
+#endif
// TODO ${MAJOR} ${MINOR} etc instead of 0.2
Modified: trunk/qgis/src/core/pal/problem.cpp
===================================================================
--- trunk/qgis/src/core/pal/problem.cpp 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/pal/problem.cpp 2009-04-06 12:52:56 UTC (rev 10485)
@@ -1317,7 +1317,7 @@
std::cout << " Conflictual..." << std::endl;
#endif
int feat, rfeat;
- bool sub = ctx->featWrap;
+ bool sub = ctx->featWrap!=NULL;
feat = lp->probFeat;
if (sub) {
@@ -1578,6 +1578,8 @@
} catch (int i) {
#ifdef _DEBUG_FULL_
std::cout << "catch int " << i << std::endl;
+#else
+ i;
#endif
while (conflicts->size() > 0)
conflicts->pop_front();
@@ -1838,6 +1840,8 @@
} catch (int i) {
#ifdef _DEBUG_FULL_
std::cout << "catch Cycle in chain" << std::endl;
+#else
+ i;
#endif
while (conflicts->size() > 0)
conflicts->pop_front();
Modified: trunk/qgis/src/core/pal/util.cpp
===================================================================
--- trunk/qgis/src/core/pal/util.cpp 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/pal/util.cpp 2009-04-06 12:52:56 UTC (rev 10485)
@@ -247,8 +247,6 @@
void extractXYCoord (Feat *f) {
int i, j;
- double phi, lambda;
-
//Projection *proj = pal->proj;
const GEOSCoordSequence *coordSeq;
Modified: trunk/qgis/src/core/pal/util.h
===================================================================
--- trunk/qgis/src/core/pal/util.h 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/pal/util.h 2009-04-06 12:52:56 UTC (rev 10485)
@@ -58,7 +58,8 @@
/**
* \brief For translating feature from GEOS to Pal
*/
- typedef struct Feat {
+ class Feat {
+ public:
const GEOSGeometry *geom;
const char *id;
int type;
@@ -72,7 +73,7 @@
int nbHoles;
PointSet **holes;
- } Feat;
+ };
/**
Modified: trunk/qgis/src/core/qgscentralpointpositionmanager.cpp
===================================================================
--- trunk/qgis/src/core/qgscentralpointpositionmanager.cpp 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/qgscentralpointpositionmanager.cpp 2009-04-06 12:52:56 UTC (rev 10485)
@@ -182,8 +182,8 @@
}
currentPosition+= sizeof(int);
- double x[numberOfPoints];
- double y[numberOfPoints];
+ double *x = new double[numberOfPoints];
+ double *y = new double[numberOfPoints];
for(int i = 0; i < numberOfPoints; ++i)
{
@@ -197,7 +197,11 @@
}
}
double centroidX, centroidY;
- if(calculatePolygonCentroid(x, y, numberOfPoints, centroidX, centroidY) != 0)
+ int res = calculatePolygonCentroid(x, y, numberOfPoints, centroidX, centroidY);
+ delete [] x;
+ delete [] y;
+
+ if( res != 0)
{
return 1;
}
Modified: trunk/qgis/src/core/qgsoverlayobject.cpp
===================================================================
--- trunk/qgis/src/core/qgsoverlayobject.cpp 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/core/qgsoverlayobject.cpp 2009-04-06 12:52:56 UTC (rev 10485)
@@ -40,6 +40,7 @@
mPositions = other.positions();
mRotation = other.rotation();
mGeometry = new QgsGeometry(*(other.geometry()));
+ return *this;
}
GEOSGeometry* QgsOverlayObject::getGeosGeometry()
Modified: trunk/qgis/src/plugins/diagram_overlay/qgsbardiagramfactory.cpp
===================================================================
--- trunk/qgis/src/plugins/diagram_overlay/qgsbardiagramfactory.cpp 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/plugins/diagram_overlay/qgsbardiagramfactory.cpp 2009-04-06 12:52:56 UTC (rev 10485)
@@ -158,4 +158,5 @@
QDomText barWidthText = doc.createTextNode(QString::number(mBarWidth));
barWidthElem.appendChild(barWidthText);
factory_node.appendChild(barWidthElem);
+ return true;
}
Modified: trunk/qgis/src/plugins/diagram_overlay/qgsdiagramrenderer.h
===================================================================
--- trunk/qgis/src/plugins/diagram_overlay/qgsdiagramrenderer.h 2009-04-06 11:53:45 UTC (rev 10484)
+++ trunk/qgis/src/plugins/diagram_overlay/qgsdiagramrenderer.h 2009-04-06 12:52:56 UTC (rev 10485)
@@ -30,9 +30,9 @@
class QImage;
//structure that describes a renderer entry
-struct QgsDiagramItem
+class QgsDiagramItem
{
-
+public:
QVariant value;
int size;
};
More information about the QGIS-commit
mailing list