Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix warnings
  • Loading branch information
jef-n committed Jan 17, 2016
1 parent 6435a20 commit 00d60db
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
14 changes: 7 additions & 7 deletions scripts/astyle.sh
Expand Up @@ -14,7 +14,6 @@
# #
###########################################################################


for ASTYLE in $(dirname $0)/qgisstyle $(dirname $0)/RelWithDebInfo/qgisstyle
do
if type -p $ASTYLE >/dev/null; then
Expand Down Expand Up @@ -48,14 +47,15 @@ if ! type -p autopep8 >/dev/null; then
}
fi

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

astyleit()
{
$ASTYLE \
"--options=$(dirname $0)/astyle.options" \
"$1"
set -e

astyleit() {
$ASTYLE --options="$ASTYLEOPTS" "$1"
scripts/unify_includes.pl "$1"
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsinternalgeometryengine.cpp
Expand Up @@ -54,8 +54,8 @@ QgsGeometry QgsInternalGeometryEngine::extrude( double x, double y )
linesToProcess << static_cast<QgsLineStringV2*>( curve->segmentize() );
}

QgsMultiPolygonV2* multipolygon = linesToProcess.size() > 1 ? new QgsMultiPolygonV2() : nullptr;
QgsPolygonV2* polygon;
QgsMultiPolygonV2 *multipolygon = linesToProcess.size() > 1 ? new QgsMultiPolygonV2() : nullptr;
QgsPolygonV2 *polygon = nullptr;

if ( !linesToProcess.empty() )
{
Expand Down
3 changes: 1 addition & 2 deletions src/core/pal/feature.cpp
Expand Up @@ -324,7 +324,7 @@ int FeaturePart::createCandidatesAtOrderedPositionsOverPoint( double x, double y
double alpha = 0.0;
double deltaX = 0;
double deltaY = 0;
LabelPosition::Quadrant quadrant;
LabelPosition::Quadrant quadrant = LabelPosition::QuadrantAboveLeft;
switch ( position )
{
case QgsPalLayerSettings::TopLeft:
Expand Down Expand Up @@ -421,7 +421,6 @@ int FeaturePart::createCandidatesAtOrderedPositionsOverPoint( double x, double y

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


//TODO - tweak
cost += 0.001;

Expand Down
10 changes: 4 additions & 6 deletions src/core/qgsexpression.cpp
Expand Up @@ -2110,8 +2110,8 @@ static QVariant fcnAzimuth( const QVariantList& values, const QgsExpressionConte
return 0.0;
else if ( pt1->y() > pt2->y() )
return M_PI;
else return 0;
return 1;
else
return 0;
}

if ( pt1->y() == pt2->y() )
Expand All @@ -2120,8 +2120,8 @@ static QVariant fcnAzimuth( const QVariantList& values, const QgsExpressionConte
return M_PI / 2;
else if ( pt1->x() > pt2->x() )
return M_PI + ( M_PI / 2 );
else return 0;
return 1;
else
return 0;
}

if ( pt1->x() < pt2->x() )
Expand Down Expand Up @@ -2150,8 +2150,6 @@ static QVariant fcnAzimuth( const QVariantList& values, const QgsExpressionConte
+ ( M_PI + ( M_PI / 2 ) );
}
}

return QVariant();
}

static QVariant fcnExtrude( const QVariantList& values, const QgsExpressionContext*, QgsExpression* parent )
Expand Down
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgs25drenderer.cpp
Expand Up @@ -84,7 +84,7 @@ Qgs25DRenderer::Qgs25DRenderer()
setShadowSpread( 4 );
setShadowColor( QColor( "#1111111" ) );

setHeight( 20 );
setHeight( "20" );
setAngle( 40 );

QgsFeatureRequest::OrderBy orderBy;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/virtual/qgsvirtuallayerblob.h
Expand Up @@ -35,7 +35,7 @@ struct SpatialiteBlobHeader
{
unsigned char start;
unsigned char endianness;
uint32_t srid;
int32_t srid;
double mbrMinX;
double mbrMinY;
double mbrMaxX;
Expand Down

0 comments on commit 00d60db

Please sign in to comment.