Skip to content

Commit

Permalink
fix msvc build errors
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10485 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 6, 2009
1 parent 846a43c commit 472848e
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/core/pal/geomfunction.cpp
Expand Up @@ -274,7 +274,7 @@ namespace pal {
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);

Expand Down
2 changes: 1 addition & 1 deletion src/core/pal/layer.h
Expand Up @@ -53,7 +53,7 @@ namespace pal {
class Pal;
class SimpleMutex;

struct Feat;
class Feat;

/**
* \brief A layer of spacial entites
Expand Down
3 changes: 3 additions & 0 deletions src/core/pal/pal.h
Expand Up @@ -40,6 +40,9 @@
#include <list>
#include <iostream>

#ifdef _MSC_VER
#include <time.h>
#endif

// TODO ${MAJOR} ${MINOR} etc instead of 0.2

Expand Down
6 changes: 5 additions & 1 deletion src/core/pal/problem.cpp
Expand Up @@ -1317,7 +1317,7 @@ namespace pal {
std::cout << " Conflictual..." << std::endl;
#endif
int feat, rfeat;
bool sub = ctx->featWrap;
bool sub = ctx->featWrap!=NULL;

feat = lp->probFeat;
if (sub) {
Expand Down Expand Up @@ -1578,6 +1578,8 @@ namespace pal {
} catch (int i) {
#ifdef _DEBUG_FULL_
std::cout << "catch int " << i << std::endl;
#else
i;
#endif
while (conflicts->size() > 0)
conflicts->pop_front();
Expand Down Expand Up @@ -1838,6 +1840,8 @@ namespace pal {
} catch (int i) {
#ifdef _DEBUG_FULL_
std::cout << "catch Cycle in chain" << std::endl;
#else
i;
#endif
while (conflicts->size() > 0)
conflicts->pop_front();
Expand Down
2 changes: 0 additions & 2 deletions src/core/pal/util.cpp
Expand Up @@ -247,8 +247,6 @@ namespace pal {
void extractXYCoord (Feat *f) {
int i, j;

double phi, lambda;

//Projection *proj = pal->proj;

const GEOSCoordSequence *coordSeq;
Expand Down
5 changes: 3 additions & 2 deletions src/core/pal/util.h
Expand Up @@ -58,7 +58,8 @@ namespace pal {
/**
* \brief For translating feature from GEOS to Pal
*/
typedef struct Feat {
class Feat {
public:
const GEOSGeometry *geom;
const char *id;
int type;
Expand All @@ -72,7 +73,7 @@ namespace pal {
int nbHoles;
PointSet **holes;

} Feat;
};


/**
Expand Down
10 changes: 7 additions & 3 deletions src/core/qgscentralpointpositionmanager.cpp
Expand Up @@ -182,8 +182,8 @@ int QgsCentralPointPositionManager::findObjectPosition(const unsigned char* wkb,
}
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)
{
Expand All @@ -197,7 +197,11 @@ int QgsCentralPointPositionManager::findObjectPosition(const unsigned char* wkb,
}
}
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;
}
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsoverlayobject.cpp
Expand Up @@ -40,6 +40,7 @@ QgsOverlayObject& QgsOverlayObject::operator=(const QgsOverlayObject& other)
mPositions = other.positions();
mRotation = other.rotation();
mGeometry = new QgsGeometry(*(other.geometry()));
return *this;
}

GEOSGeometry* QgsOverlayObject::getGeosGeometry()
Expand Down
1 change: 1 addition & 0 deletions src/plugins/diagram_overlay/qgsbardiagramfactory.cpp
Expand Up @@ -158,4 +158,5 @@ bool QgsBarDiagramFactory::_writeXML(QDomNode& factory_node, QDomDocument& doc)
QDomText barWidthText = doc.createTextNode(QString::number(mBarWidth));
barWidthElem.appendChild(barWidthText);
factory_node.appendChild(barWidthElem);
return true;
}
4 changes: 2 additions & 2 deletions src/plugins/diagram_overlay/qgsdiagramrenderer.h
Expand Up @@ -30,9 +30,9 @@ class QDomNode;
class QImage;

//structure that describes a renderer entry
struct QgsDiagramItem
class QgsDiagramItem
{

public:
QVariant value;
int size;
};
Expand Down

0 comments on commit 472848e

Please sign in to comment.