Skip to content

Commit

Permalink
fix warnings (possibly fixing one bug) and build errors on windows
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11212 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jul 30, 2009
1 parent 5d9b66f commit 5b1720a
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 9 deletions.
9 changes: 8 additions & 1 deletion src/plugins/interpolation/DualEdgeTriangulation.cc
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -3124,6 +3129,8 @@ bool DualEdgeTriangulation::saveAsShapefile( const QString& fileName ) const
alreadyVisitedEdges[i] = true;
}

delete [] alreadyVisitedEdges;

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/interpolation/qgsinterpolationdialog.cpp
Expand Up @@ -144,7 +144,7 @@ void QgsInterpolationDialog::on_buttonBox_accepted()
}
else
{
currentLayerData.mInputType == QgsInterpolator::POINTS;
currentLayerData.mInputType = QgsInterpolator::POINTS;
}
inputLayerList.push_back( currentLayerData );
}
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/interpolation/qgstininterpolator.cpp
Expand Up @@ -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 )
{
Expand Down
6 changes: 6 additions & 0 deletions src/providers/osm/CMakeLists.txt
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/providers/osm/osmhandler.cpp
Expand Up @@ -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;
}

5 changes: 2 additions & 3 deletions src/providers/osm/osmprovider.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1222,6 +1219,8 @@ bool QgsOSMDataProvider::removeIncorrectWays()

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

return true;
}


Expand Down
3 changes: 0 additions & 3 deletions src/providers/osm/osmrenderer.cpp
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion src/providers/osm/osmstyle.cpp
Expand Up @@ -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));
Expand Down

0 comments on commit 5b1720a

Please sign in to comment.