Skip to content

Commit 00d60db

Browse files
committedJan 17, 2016
fix warnings
1 parent 6435a20 commit 00d60db

File tree

6 files changed

+16
-19
lines changed

6 files changed

+16
-19
lines changed
 

‎scripts/astyle.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# #
1515
###########################################################################
1616

17-
1817
for ASTYLE in $(dirname $0)/qgisstyle $(dirname $0)/RelWithDebInfo/qgisstyle
1918
do
2019
if type -p $ASTYLE >/dev/null; then
@@ -48,14 +47,15 @@ if ! type -p autopep8 >/dev/null; then
4847
}
4948
fi
5049

51-
set -e
50+
ASTYLEOPTS=$(dirname $0)/astyle.options
51+
if type -p cygpath >/dev/null; then
52+
ASTYLEOPTS="$(cygpath -w $ASTYLEOPTS)"
53+
fi
5254

53-
astyleit()
54-
{
55-
$ASTYLE \
56-
"--options=$(dirname $0)/astyle.options" \
57-
"$1"
55+
set -e
5856

57+
astyleit() {
58+
$ASTYLE --options="$ASTYLEOPTS" "$1"
5959
scripts/unify_includes.pl "$1"
6060
}
6161

‎src/core/geometry/qgsinternalgeometryengine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ QgsGeometry QgsInternalGeometryEngine::extrude( double x, double y )
5454
linesToProcess << static_cast<QgsLineStringV2*>( curve->segmentize() );
5555
}
5656

57-
QgsMultiPolygonV2* multipolygon = linesToProcess.size() > 1 ? new QgsMultiPolygonV2() : nullptr;
58-
QgsPolygonV2* polygon;
57+
QgsMultiPolygonV2 *multipolygon = linesToProcess.size() > 1 ? new QgsMultiPolygonV2() : nullptr;
58+
QgsPolygonV2 *polygon = nullptr;
5959

6060
if ( !linesToProcess.empty() )
6161
{

‎src/core/pal/feature.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ int FeaturePart::createCandidatesAtOrderedPositionsOverPoint( double x, double y
324324
double alpha = 0.0;
325325
double deltaX = 0;
326326
double deltaY = 0;
327-
LabelPosition::Quadrant quadrant;
327+
LabelPosition::Quadrant quadrant = LabelPosition::QuadrantAboveLeft;
328328
switch ( position )
329329
{
330330
case QgsPalLayerSettings::TopLeft:
@@ -421,7 +421,6 @@ int FeaturePart::createCandidatesAtOrderedPositionsOverPoint( double x, double y
421421

422422
lPos << new LabelPosition( i, labelX, labelY, labelWidth, labelHeight, angle, cost, this, false, quadrant );
423423

424-
425424
//TODO - tweak
426425
cost += 0.001;
427426

‎src/core/qgsexpression.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,8 +2110,8 @@ static QVariant fcnAzimuth( const QVariantList& values, const QgsExpressionConte
21102110
return 0.0;
21112111
else if ( pt1->y() > pt2->y() )
21122112
return M_PI;
2113-
else return 0;
2114-
return 1;
2113+
else
2114+
return 0;
21152115
}
21162116

21172117
if ( pt1->y() == pt2->y() )
@@ -2120,8 +2120,8 @@ static QVariant fcnAzimuth( const QVariantList& values, const QgsExpressionConte
21202120
return M_PI / 2;
21212121
else if ( pt1->x() > pt2->x() )
21222122
return M_PI + ( M_PI / 2 );
2123-
else return 0;
2124-
return 1;
2123+
else
2124+
return 0;
21252125
}
21262126

21272127
if ( pt1->x() < pt2->x() )
@@ -2150,8 +2150,6 @@ static QVariant fcnAzimuth( const QVariantList& values, const QgsExpressionConte
21502150
+ ( M_PI + ( M_PI / 2 ) );
21512151
}
21522152
}
2153-
2154-
return QVariant();
21552153
}
21562154

21572155
static QVariant fcnExtrude( const QVariantList& values, const QgsExpressionContext*, QgsExpression* parent )

‎src/core/symbology-ng/qgs25drenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Qgs25DRenderer::Qgs25DRenderer()
8484
setShadowSpread( 4 );
8585
setShadowColor( QColor( "#1111111" ) );
8686

87-
setHeight( 20 );
87+
setHeight( "20" );
8888
setAngle( 40 );
8989

9090
QgsFeatureRequest::OrderBy orderBy;

‎src/providers/virtual/qgsvirtuallayerblob.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct SpatialiteBlobHeader
3535
{
3636
unsigned char start;
3737
unsigned char endianness;
38-
uint32_t srid;
38+
int32_t srid;
3939
double mbrMinX;
4040
double mbrMinY;
4141
double mbrMaxX;

0 commit comments

Comments
 (0)
Please sign in to comment.