Skip to content
Permalink
Browse files

fix warnings (possibly fixing one bug) and build errors on windows

git-svn-id: http://svn.osgeo.org/qgis/trunk@11212 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jul 30, 2009
1 parent 5d9b66f commit 5b1720a8210e0ee9498ddb6c4eed37c4e83ccca2
@@ -3081,7 +3081,12 @@ bool DualEdgeTriangulation::saveAsShapefile( const QString& fileName ) const
return false;
}

bool alreadyVisitedEdges[mHalfEdge.size()];
bool *alreadyVisitedEdges = new bool[mHalfEdge.size()];
if( !alreadyVisitedEdges )
{
QgsDebugMsg( "out of memory" );
return false;
}

for ( int i = 0; i < mHalfEdge.size(); ++i )
{
@@ -3124,6 +3129,8 @@ bool DualEdgeTriangulation::saveAsShapefile( const QString& fileName ) const
alreadyVisitedEdges[i] = true;
}

delete [] alreadyVisitedEdges;

return true;
}

@@ -144,7 +144,7 @@ void QgsInterpolationDialog::on_buttonBox_accepted()
}
else
{
currentLayerData.mInputType == QgsInterpolator::POINTS;
currentLayerData.mInputType = QgsInterpolator::POINTS;
}
inputLayerList.push_back( currentLayerData );
}
@@ -25,6 +25,11 @@
#include "qgsvectorlayer.h"
#include <QProgressDialog>

#ifdef WIN32
#include <float.h>
#define isnan(f) _isnan(f)
#endif

QgsTINInterpolator::QgsTINInterpolator( const QList<LayerData>& inputData, bool showProgressDialog ): QgsInterpolator( inputData ), mTriangulation( 0 ), \
mTriangleInterpolator( 0 ), mIsInitialized( false ), mShowProgressDialog( showProgressDialog )
{
@@ -28,6 +28,12 @@ INCLUDE_DIRECTORIES (
${GEOS_INCLUDE_DIR}
)

IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(BEFORE ../../core/spatialite/headers/spatialite)
ELSE (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR})
ENDIF (WITH_INTERNAL_SPATIALITE)

ADD_LIBRARY (osmprovider MODULE ${OSM_SRCS} ${OSM_MOC_SRCS})

TARGET_LINK_LIBRARIES (osmprovider
@@ -378,5 +378,6 @@ bool OsmHandler::endDocument()
{
// first commit all database actions connected to xml parsing
sqlite3_exec(mDatabase, "COMMIT;", 0, 0, 0);
return true;
}

@@ -557,7 +557,6 @@ bool QgsOSMDataProvider::fetchWay(QgsFeature& feature, sqlite3_stmt* stmt, bool
int selId;
const char* selTimestamp;
const char* selUser;
int selWayMemberCount;
QgsGeometry *theGeometry = NULL;
bool fetchMoreRows = true;
int rc=-1;
@@ -1043,7 +1042,6 @@ bool QgsOSMDataProvider::updateWayWKB(int wayId, int isClosed, char **geo, int *

double selLat = sqlite3_column_double(stmtSelectMembers,0);
double selLon = sqlite3_column_double(stmtSelectMembers,1);
int selNodeId = sqlite3_column_int(stmtSelectMembers,2);

if (selLat<minLat) minLat = selLat;
if (selLon<minLon) minLon = selLon;
@@ -1086,7 +1084,6 @@ bool QgsOSMDataProvider::updateWayWKB(int wayId, int isClosed, char **geo, int *

double selLat = sqlite3_column_double(stmtSelectMembers,0);
double selLon = sqlite3_column_double(stmtSelectMembers,1);
int selNodeId = sqlite3_column_int(stmtSelectMembers,2);

if (selLat<minLat) minLat = selLat;
if (selLon<minLon) minLon = selLon;
@@ -1222,6 +1219,8 @@ bool QgsOSMDataProvider::removeIncorrectWays()

// commit actions
sqlite3_exec(mDatabase,"COMMIT;",0,0,0);

return true;
}


@@ -103,9 +103,6 @@ void OsmRenderer::renderFeature( QgsRenderContext &renderContext, QgsFeature& f,
{
QPen pen = osmstyle.get_pen(tags);
QColor penColor = pen.color();
int red = penColor.red();
int green = penColor.green();
int blue = penColor.blue();
p->setPen( osmstyle.get_pen(tags) );
p->setOpacity(1.0);
}
@@ -137,7 +137,6 @@ void OsmStyle::parse_rule_point(QString line)
double widthScale = 1.0;
bool selected = false;
QColor mSelectionColor(255,255,0);
double rasterScaleFactor = 1.0;

QgsSymbol sym(QGis::Point);
sym.setNamedPointSymbol(QString("svg:%1%2").arg(QgsApplication::svgPath()).arg(name));

0 comments on commit 5b1720a

Please sign in to comment.
You can’t perform that action at this time.