Skip to content

Commit f9c27e4

Browse files
author
jef
committed
fix warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk@11529 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2ab5702 commit f9c27e4

File tree

3 files changed

+14
-28
lines changed

3 files changed

+14
-28
lines changed

src/core/qgsmessageoutput.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ void QgsMessageOutputConsole::showMessage( bool )
6262
{
6363
// show title if provided
6464
if ( !mTitle.isNull() )
65+
{
6566
QgsDebugMsg( QString( "%1:" ).arg( mTitle ) );
67+
}
68+
6669
// show the message
6770
QgsDebugMsg( mMessage );
6871
emit destroyed();

src/plugins/raster_terrain_analysis/qgsaspectfilter.cpp

+10-27
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "qgsaspectfilter.h"
1919

20-
QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
20+
QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ) :
2121
QgsDerivativeFilter( inputFile, outputFile, outputFormat )
2222
{
2323

@@ -28,40 +28,23 @@ QgsAspectFilter::~QgsAspectFilter()
2828

2929
}
3030

31-
float QgsAspectFilter::processNineCellWindow( float* x11, float* x21, float* x31, float* x12, float* x22, \
32-
float* x32, float* x13, float* x23, float* x33 )
31+
float QgsAspectFilter::processNineCellWindow(
32+
float* x11, float* x21, float* x31,
33+
float* x12, float* x22, float* x32,
34+
float* x13, float* x23, float* x33 )
3335
{
3436
float derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
3537
float derY = calcFirstDerY( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
3638

37-
if ( derX == mOutputNodataValue || derY == mOutputNodataValue )
39+
if ( derX == mOutputNodataValue ||
40+
derY == mOutputNodataValue ||
41+
(derX == 0.0 && derY == 0.0) )
3842
{
3943
return mOutputNodataValue;
4044
}
41-
42-
if ( derY < 0 && derX > 0 )
43-
{
44-
return 360 + ( atan( derX / derY ) * 180 / M_PI );
45-
}
46-
else if ( derY < 0 && derX < 0 )
47-
{
48-
return atan( derX / derY ) * 180 / M_PI;
49-
}
50-
else if ( derY > 0 )
51-
{
52-
return ( atan( derX / derY ) * 180 / M_PI ) + 180;
53-
}
54-
else if ( derX < 0 && derY == 0 )
55-
{
56-
return 90;
57-
}
58-
else if ( derX > 0 && derY == 0 )
45+
else
5946
{
60-
return 270;
61-
}
62-
else if ( derX == 0 && derY == 0 )
63-
{
64-
return mOutputNodataValue;
47+
return 180.0 + atan2(derX, derY) * 180.0 / M_PI;
6548
}
6649
}
6750

src/providers/osm/osmprovider.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class QgsOSMDataProvider: public QgsVectorDataProvider
2525
{
26-
26+
Q_OBJECT
2727
private:
2828

2929
//! provider manages features with one of three geometry types; variable determines feature type of this provider

0 commit comments

Comments
 (0)