Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11529 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 30, 2009
1 parent 50b4e2b commit cf431e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 28 deletions.
3 changes: 3 additions & 0 deletions src/core/qgsmessageoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ void QgsMessageOutputConsole::showMessage( bool )
{
// show title if provided
if ( !mTitle.isNull() )
{
QgsDebugMsg( QString( "%1:" ).arg( mTitle ) );
}

// show the message
QgsDebugMsg( mMessage );
emit destroyed();
Expand Down
37 changes: 10 additions & 27 deletions src/plugins/raster_terrain_analysis/qgsaspectfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "qgsaspectfilter.h"

QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ) :
QgsDerivativeFilter( inputFile, outputFile, outputFormat )
{

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

}

float QgsAspectFilter::processNineCellWindow( float* x11, float* x21, float* x31, float* x12, float* x22, \
float* x32, float* x13, float* x23, float* x33 )
float QgsAspectFilter::processNineCellWindow(
float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 )
{
float derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
float derY = calcFirstDerY( x11, x21, x31, x12, x22, x32, x13, x23, x33 );

if ( derX == mOutputNodataValue || derY == mOutputNodataValue )
if ( derX == mOutputNodataValue ||
derY == mOutputNodataValue ||
(derX == 0.0 && derY == 0.0) )
{
return mOutputNodataValue;
}

if ( derY < 0 && derX > 0 )
{
return 360 + ( atan( derX / derY ) * 180 / M_PI );
}
else if ( derY < 0 && derX < 0 )
{
return atan( derX / derY ) * 180 / M_PI;
}
else if ( derY > 0 )
{
return ( atan( derX / derY ) * 180 / M_PI ) + 180;
}
else if ( derX < 0 && derY == 0 )
{
return 90;
}
else if ( derX > 0 && derY == 0 )
else
{
return 270;
}
else if ( derX == 0 && derY == 0 )
{
return mOutputNodataValue;
return 180.0 + atan2(derX, derY) * 180.0 / M_PI;
}
}

2 changes: 1 addition & 1 deletion src/providers/osm/osmprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
class QgsOSMDataProvider: public QgsVectorDataProvider
{

Q_OBJECT
private:

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

0 comments on commit cf431e2

Please sign in to comment.