Skip to content
Permalink
Browse files

fix windows build and a couple of warnings

  • Loading branch information
jef-n committed Aug 1, 2012
1 parent 2d9115f commit 2e52cb524f7c285458b549248e7d1aa9a3964989
@@ -958,7 +958,7 @@ bool QgsGeometryAnalyzer::eventLayer( QgsVectorLayer* lineLayer, QgsVectorLayer*
eventLayer->select( eventLayer->pendingAllAttributesList(), QgsRectangle(), false, false );
QgsGeometry* lrsGeom = 0;
QgsFeature lineFeature;
double measure1, measure2;
double measure1, measure2 = 0.0;

int nEventFeatures = eventLayer->pendingFeatureCount();
int featureCounter = 0;
@@ -1271,7 +1271,7 @@ unsigned char* QgsGeometryAnalyzer::locateBetweenWkbString( unsigned char* ptr,
{
int* nPoints = ( int* ) ptr;
ptr += sizeof( int );
double prevx, prevy, prevz;
double prevx = 0.0, prevy = 0.0, prevz = 0.0;
double *x, *y, *z;
QgsPolyline currentLine;

@@ -1323,7 +1323,7 @@ unsigned char* QgsGeometryAnalyzer::locateAlongWkbString( unsigned char* ptr, Qg
{
int* nPoints = ( int* ) ptr;
ptr += sizeof( int );
double prevx, prevy, prevz;
double prevx = 0.0, prevy = 0.0, prevz = 0.0;
double *x, *y, *z;

QgsPoint pt1, pt2;
@@ -433,7 +433,7 @@ void QgsLegend::mouseMoveEvent( QMouseEvent * e )
showItem( "layer/group" , item );

int line_x = visualItemRect( item ).left();
int line_y;
int line_y = 0;
if ( layer )
{
QTreeWidgetItem *lastItem = item->childCount() > 0 && item->isExpanded() ? item->child( item->childCount() - 1 ) : item;
@@ -22,6 +22,13 @@
#include <QList>
#include <QPair>

#ifdef _MSC_VER
// qextserialport.h includes windows.h,
// which defines min()/max() macros w/o NOMINMAX,
// which in turn breaks limits std::numeric_limits<T>::min()/max()
#define NOMINMAX
#endif

#include "qextserialport.h"

class QgsGPSConnection;
@@ -676,7 +676,9 @@ void QgsRasterHistogramWidget::histoAction( const QString actionName, bool actio
else if ( actionName.left( 5 ) == "Load " && mRendererWidget )
{
QVector<int> myBands;
#if 0
double minMaxValues[2];
#endif
bool ok = false;

// find which band(s) need updating (all or current)
@@ -270,8 +270,11 @@ double QgsGrassRasterProvider::noDataValue() const
// limit: 1.7976931348623157e+308
nul = -1e+300;
}
else if ( mGrassDataType == FCELL_TYPE )
else
{
if ( mGrassDataType != FCELL_TYPE )
QgsDebugMsg( "unexpected data type" );

// limit: 3.40282347e+38
nul = -1e+30;
}
@@ -303,7 +306,7 @@ QList<QgsColorRampShader::ColorRampItem> QgsGrassRasterProvider::colorTable( int
QList<QgsGrass::Color> colors = QgsGrass::colors( mGisdbase, mLocation, mMapset, mMapName );
QList<QgsGrass::Color>::iterator i;

double v, r, g, b;
double v = 0.0, r = 0.0, g = 0.0, b = 0.0;
for ( i = colors.begin(); i != colors.end(); ++i )
{
if ( ct.count() == 0 || i->value1 != v || i->red1 != r || i->green1 != g || i->blue1 != b )

0 comments on commit 2e52cb5

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