Skip to content

Commit

Permalink
Standardise format of initializer lists
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 2, 2016
1 parent cad3a5a commit ccebd83
Show file tree
Hide file tree
Showing 199 changed files with 1,002 additions and 459 deletions.
4 changes: 3 additions & 1 deletion src/analysis/interpolation/Node.h
Expand Up @@ -42,7 +42,9 @@ class ANALYSIS_EXPORT Node
void setPoint( Point3D* p );
};

inline Node::Node() : mPoint( nullptr ), mNext( nullptr )
inline Node::Node()
: mPoint( nullptr )
, mNext( nullptr )
{

}
Expand Down
10 changes: 8 additions & 2 deletions src/analysis/interpolation/ParametricLine.h
Expand Up @@ -58,12 +58,18 @@ class ANALYSIS_EXPORT ParametricLine

//-----------------------------------------constructors and destructor----------------------

inline ParametricLine::ParametricLine() : mDegree( 0 ), mParent( nullptr ), mControlPoly( nullptr )
inline ParametricLine::ParametricLine()
: mDegree( 0 )
, mParent( nullptr )
, mControlPoly( nullptr )
{

}

inline ParametricLine::ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly ) : mDegree( 0 ), mParent( par ), mControlPoly( controlpoly )
inline ParametricLine::ParametricLine( ParametricLine* par, QVector<Point3D*>* controlpoly )
: mDegree( 0 )
, mParent( par )
, mControlPoly( controlpoly )
{

}
Expand Down
10 changes: 8 additions & 2 deletions src/analysis/interpolation/Point3D.h
Expand Up @@ -54,12 +54,18 @@ class ANALYSIS_EXPORT Point3D
void setZ( double z );
};

inline Point3D::Point3D() : mX( 0 ), mY( 0 ), mZ( 0 )
inline Point3D::Point3D()
: mX( 0 )
, mY( 0 )
, mZ( 0 )
{

}

inline Point3D::Point3D( double x, double y, double z ) : mX( x ), mY( y ), mZ( z )
inline Point3D::Point3D( double x, double y, double z )
: mX( x )
, mY( y )
, mZ( z )
{

}
Expand Down
10 changes: 8 additions & 2 deletions src/analysis/interpolation/Vector3D.h
Expand Up @@ -65,12 +65,18 @@ class ANALYSIS_EXPORT Vector3D

//------------------------------------------constructors------------------------------------

inline Vector3D::Vector3D( double x, double y, double z ) : mX( x ), mY( y ), mZ( z )
inline Vector3D::Vector3D( double x, double y, double z )
: mX( x )
, mY( y )
, mZ( z )
{

}

inline Vector3D::Vector3D() : mX( 0 ), mY( 0 ), mZ( 0 )//using a list
inline Vector3D::Vector3D()
: mX( 0 )
, mY( 0 )
, mZ( 0 )//using a list
{

}
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/network/qgsgraphbuilder.cpp
Expand Up @@ -21,8 +21,8 @@
#include <qgsfeature.h>
#include <qgsgeometry.h>

QgsGraphBuilder::QgsGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool otfEnabled, double topologyTolerance, const QString& ellipsoidID ) :
QgsGraphBuilderInterface( crs, otfEnabled, topologyTolerance, ellipsoidID )
QgsGraphBuilder::QgsGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool otfEnabled, double topologyTolerance, const QString& ellipsoidID )
: QgsGraphBuilderInterface( crs, otfEnabled, topologyTolerance, ellipsoidID )
{
mGraph = new QgsGraph();
}
Expand Down
6 changes: 4 additions & 2 deletions src/analysis/network/qgsgraphbuilderintr.h
Expand Up @@ -41,8 +41,10 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* @param topologyTolerance sqrt distance between source point as one graph vertex
* @param ellipsoidID ellipsoid for edge measurement
*/
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84" ) :
mCrs( crs ), mCtfEnabled( ctfEnabled ), mTopologyTolerance( topologyTolerance )
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84" )
: mCrs( crs )
, mCtfEnabled( ctfEnabled )
, mTopologyTolerance( topologyTolerance )
{
mDa.setSourceCrs( mCrs.srsid() );
mDa.setEllipsoid( ellipsoidID );
Expand Down
10 changes: 8 additions & 2 deletions src/analysis/openstreetmap/qgsosmbase.h
Expand Up @@ -57,7 +57,10 @@ class ANALYSIS_EXPORT QgsOSMNode : public QgsOSMElement
{
public:
QgsOSMNode() : mPoint() {}
QgsOSMNode( QgsOSMId id, const QgsPoint& point ) : QgsOSMElement( QgsOSMElementID::Node, id ), mPoint( point ) {}
QgsOSMNode( QgsOSMId id, const QgsPoint& point )
: QgsOSMElement( QgsOSMElementID::Node, id )
, mPoint( point )
{}

QgsPoint point() const { return mPoint; }

Expand All @@ -77,7 +80,10 @@ class ANALYSIS_EXPORT QgsOSMWay : public QgsOSMElement
{
public:
QgsOSMWay() {}
QgsOSMWay( QgsOSMId id, const QList<QgsOSMId>& nodes ) : QgsOSMElement( QgsOSMElementID::Way, id ), mNodes( nodes ) {}
QgsOSMWay( QgsOSMId id, const QList<QgsOSMId>& nodes )
: QgsOSMElement( QgsOSMElementID::Way, id )
, mNodes( nodes )
{}

QList<QgsOSMId> nodes() const { return mNodes; }

Expand Down
3 changes: 2 additions & 1 deletion src/analysis/openstreetmap/qgsosmdownload.cpp
Expand Up @@ -22,7 +22,8 @@ QString QgsOSMDownload::queryFromRect( const QgsRectangle& rect )


QgsOSMDownload::QgsOSMDownload()
: mServiceUrl( defaultServiceUrl() ), mReply( nullptr )
: mServiceUrl( defaultServiceUrl() )
, mReply( nullptr )
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/analysis/raster/qgsaspectfilter.cpp
Expand Up @@ -17,8 +17,8 @@

#include "qgsaspectfilter.h"

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

}
Expand Down
19 changes: 15 additions & 4 deletions src/analysis/vector/qgstransectsample.cpp
Expand Up @@ -15,10 +15,21 @@
QgsTransectSample::QgsTransectSample( QgsVectorLayer* strataLayer, const QString& strataIdAttribute, const QString& minDistanceAttribute, const QString& nPointsAttribute, DistanceUnits minDistUnits,
QgsVectorLayer* baselineLayer, bool shareBaseline, const QString& baselineStrataId, const QString& outputPointLayer,
const QString& outputLineLayer, const QString& usedBaselineLayer, double minTransectLength,
double baselineBufferDistance, double baselineSimplificationTolerance ): mStrataLayer( strataLayer ),
mStrataIdAttribute( strataIdAttribute ), mMinDistanceAttribute( minDistanceAttribute ), mNPointsAttribute( nPointsAttribute ), mBaselineLayer( baselineLayer ), mShareBaseline( shareBaseline ),
mBaselineStrataId( baselineStrataId ), mOutputPointLayer( outputPointLayer ), mOutputLineLayer( outputLineLayer ), mUsedBaselineLayer( usedBaselineLayer ),
mMinDistanceUnits( minDistUnits ), mMinTransectLength( minTransectLength ), mBaselineBufferDistance( baselineBufferDistance ), mBaselineSimplificationTolerance( baselineSimplificationTolerance )
double baselineBufferDistance, double baselineSimplificationTolerance )
: mStrataLayer( strataLayer )
, mStrataIdAttribute( strataIdAttribute )
, mMinDistanceAttribute( minDistanceAttribute )
, mNPointsAttribute( nPointsAttribute )
, mBaselineLayer( baselineLayer )
, mShareBaseline( shareBaseline )
, mBaselineStrataId( baselineStrataId )
, mOutputPointLayer( outputPointLayer )
, mOutputLineLayer( outputLineLayer )
, mUsedBaselineLayer( usedBaselineLayer )
, mMinDistanceUnits( minDistUnits )
, mMinTransectLength( minTransectLength )
, mBaselineBufferDistance( baselineBufferDistance )
, mBaselineSimplificationTolerance( baselineSimplificationTolerance )
{
}

Expand Down
5 changes: 4 additions & 1 deletion src/app/composer/qgscomposer.h
Expand Up @@ -616,7 +616,10 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase

struct PanelStatus
{
PanelStatus( bool visible = true, bool active = false ) : isVisible( visible ), isActive( active ) {}
PanelStatus( bool visible = true, bool active = false )
: isVisible( visible )
, isActive( active )
{}
bool isVisible;
bool isActive;
};
Expand Down
3 changes: 2 additions & 1 deletion src/app/openstreetmap/qgsosmdownloaddialog.cpp
Expand Up @@ -30,7 +30,8 @@
#include "qgsosmdownload.h"

QgsOSMDownloadDialog::QgsOSMDownloadDialog( QWidget* parent )
: QDialog( parent ), mDownload( new QgsOSMDownload )
: QDialog( parent )
, mDownload( new QgsOSMDownload )
{
setupUi( this );

Expand Down
5 changes: 3 additions & 2 deletions src/app/openstreetmap/qgsosmexportdialog.cpp
Expand Up @@ -27,8 +27,9 @@
#include <QSettings>
#include <QStandardItemModel>

QgsOSMExportDialog::QgsOSMExportDialog( QWidget *parent ) :
QDialog( parent ), mDatabase( new QgsOSMDatabase )
QgsOSMExportDialog::QgsOSMExportDialog( QWidget *parent )
: QDialog( parent )
, mDatabase( new QgsOSMDatabase )
{
setupUi( this );

Expand Down
3 changes: 2 additions & 1 deletion src/app/openstreetmap/qgsosmimportdialog.cpp
Expand Up @@ -23,7 +23,8 @@
#include "qgsosmimport.h"

QgsOSMImportDialog::QgsOSMImportDialog( QWidget* parent )
: QDialog( parent ), mImport( new QgsOSMXmlImport )
: QDialog( parent )
, mImport( new QgsOSMXmlImport )
{
setupUi( this );

Expand Down
6 changes: 5 additions & 1 deletion src/app/qgsapplayertreeviewmenuprovider.h
Expand Up @@ -25,7 +25,11 @@ class QAction;
struct LegendLayerAction
{
LegendLayerAction( QAction* a, const QString& m, const QString& i, bool all )
: action( a ), menu( m ), id( i ), allLayers( all ) {}
: action( a )
, menu( m )
, id( i )
, allLayers( all )
{}
QAction* action;
QString menu;
QString id;
Expand Down
20 changes: 10 additions & 10 deletions src/app/qgsbrowserdockwidget.cpp
Expand Up @@ -62,8 +62,8 @@ void QgsBrowserPropertiesWrapLabel::adjustHeight( QSizeF size )
setMaximumHeight( height );
}

QgsBrowserPropertiesWidget::QgsBrowserPropertiesWidget( QWidget* parent ) :
QWidget( parent )
QgsBrowserPropertiesWidget::QgsBrowserPropertiesWidget( QWidget* parent )
: QWidget( parent )
{
}

Expand Down Expand Up @@ -102,8 +102,8 @@ QgsBrowserPropertiesWidget* QgsBrowserPropertiesWidget::createWidget( QgsDataIte
return propertiesWidget;
}

QgsBrowserLayerProperties::QgsBrowserLayerProperties( QWidget* parent ) :
QgsBrowserPropertiesWidget( parent )
QgsBrowserLayerProperties::QgsBrowserLayerProperties( QWidget* parent )
: QgsBrowserPropertiesWidget( parent )
{
setupUi( this );

Expand Down Expand Up @@ -215,8 +215,8 @@ void QgsBrowserLayerProperties::setCondensedMode( bool condensedMode )
}
}

QgsBrowserDirectoryProperties::QgsBrowserDirectoryProperties( QWidget* parent ) :
QgsBrowserPropertiesWidget( parent )
QgsBrowserDirectoryProperties::QgsBrowserDirectoryProperties( QWidget* parent )
: QgsBrowserPropertiesWidget( parent )
, mDirectoryWidget( nullptr )
{
setupUi( this );
Expand All @@ -236,8 +236,8 @@ void QgsBrowserDirectoryProperties::setItem( QgsDataItem* item )
mLayout->addWidget( mDirectoryWidget );
}

QgsBrowserPropertiesDialog::QgsBrowserPropertiesDialog( const QString& settingsSection, QWidget* parent ) :
QDialog( parent )
QgsBrowserPropertiesDialog::QgsBrowserPropertiesDialog( const QString& settingsSection, QWidget* parent )
: QDialog( parent )
, mPropertiesWidget( nullptr )
, mSettingsSection( settingsSection )
{
Expand All @@ -262,8 +262,8 @@ void QgsBrowserPropertiesDialog::setItem( QgsDataItem* item )
setWindowTitle( item->type() == QgsDataItem::Layer ? tr( "Layer Properties" ) : tr( "Directory Properties" ) );
}

QgsBrowserDockWidget::QgsBrowserDockWidget( const QString& name, QWidget * parent ) :
QDockWidget( parent )
QgsBrowserDockWidget::QgsBrowserDockWidget( const QString& name, QWidget * parent )
: QDockWidget( parent )
, mModel( nullptr )
, mProxyModel( nullptr )
, mPropertiesWidgetEnabled( false )
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsconfigureshortcutsdialog.cpp
Expand Up @@ -29,7 +29,8 @@
#include <QSettings>

QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget* parent )
: QDialog( parent ), mGettingShortcut( false )
: QDialog( parent )
, mGettingShortcut( false )
{
setupUi( this );

Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsdecorationcopyrightdialog.cpp
Expand Up @@ -24,7 +24,8 @@
#include <QPushButton>

QgsDecorationCopyrightDialog::QgsDecorationCopyrightDialog( QgsDecorationCopyright& deco, QWidget* parent )
: QDialog( parent ), mDeco( deco )
: QDialog( parent )
, mDeco( deco )
{
setupUi( this );

Expand Down
5 changes: 4 additions & 1 deletion src/app/qgsdecorationgriddialog.cpp
Expand Up @@ -30,7 +30,10 @@
#include <QSettings>

QgsDecorationGridDialog::QgsDecorationGridDialog( QgsDecorationGrid& deco, QWidget* parent )
: QDialog( parent ), mDeco( deco ), mLineSymbol( nullptr ), mMarkerSymbol( nullptr )
: QDialog( parent )
, mDeco( deco )
, mLineSymbol( nullptr )
, mMarkerSymbol( nullptr )
{
setupUi( this );

Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsdecorationnortharrowdialog.cpp
Expand Up @@ -22,7 +22,8 @@
#include <QPushButton>

QgsDecorationNorthArrowDialog::QgsDecorationNorthArrowDialog( QgsDecorationNorthArrow& deco, QWidget* parent )
: QDialog( parent ), mDeco( deco )
: QDialog( parent )
, mDeco( deco )
{
setupUi( this );

Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsdecorationscalebardialog.cpp
Expand Up @@ -21,7 +21,8 @@
#include <QPushButton>

QgsDecorationScaleBarDialog::QgsDecorationScaleBarDialog( QgsDecorationScaleBar& deco, int units, QWidget* parent )
: QDialog( parent ), mDeco( deco )
: QDialog( parent )
, mDeco( deco )
{
setupUi( this );

Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsformannotationdialog.cpp
Expand Up @@ -20,7 +20,9 @@
#include <QGraphicsScene>

QgsFormAnnotationDialog::QgsFormAnnotationDialog( QgsFormAnnotationItem* item, QWidget * parent, Qt::WindowFlags f )
: QDialog( parent, f ), mItem( item ), mEmbeddedWidget( nullptr )
: QDialog( parent, f )
, mItem( item )
, mEmbeddedWidget( nullptr )
{
setupUi( this );
mEmbeddedWidget = new QgsAnnotationWidget( mItem );
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgshtmlannotationdialog.cpp
Expand Up @@ -20,7 +20,9 @@
#include <QGraphicsScene>

QgsHtmlAnnotationDialog::QgsHtmlAnnotationDialog( QgsHtmlAnnotationItem* item, QWidget * parent, Qt::WindowFlags f )
: QDialog( parent, f ), mItem( item ), mEmbeddedWidget( nullptr )
: QDialog( parent, f )
, mItem( item )
, mEmbeddedWidget( nullptr )
{
setupUi( this );
setWindowTitle( tr( "HTML annotation" ) );
Expand Down
7 changes: 5 additions & 2 deletions src/app/qgsidentifyresultsdialog.h
Expand Up @@ -263,8 +263,11 @@ class QgsIdentifyResultsDialogMapLayerAction : public QAction
Q_OBJECT

public:
QgsIdentifyResultsDialogMapLayerAction( const QString &name, QObject *parent, QgsMapLayerAction* action, QgsMapLayer* layer, QgsFeature * f ) :
QAction( name, parent ), mAction( action ), mFeature( f ), mLayer( layer )
QgsIdentifyResultsDialogMapLayerAction( const QString &name, QObject *parent, QgsMapLayerAction* action, QgsMapLayer* layer, QgsFeature * f )
: QAction( name, parent )
, mAction( action )
, mFeature( f )
, mLayer( layer )
{}

public slots:
Expand Down
7 changes: 5 additions & 2 deletions src/app/qgsmapstylingwidget.cpp
Expand Up @@ -10,8 +10,11 @@
#include "qgsmapcanvas.h"
#include "qgsmaplayer.h"

QgsMapStylingWidget::QgsMapStylingWidget( QgsMapCanvas* canvas, QWidget *parent ) :
QWidget( parent ), mMapCanvas( canvas ), mBlockAutoApply( false ), mCurrentLayer( nullptr )
QgsMapStylingWidget::QgsMapStylingWidget( QgsMapCanvas* canvas, QWidget *parent )
: QWidget( parent )
, mMapCanvas( canvas )
, mBlockAutoApply( false )
, mCurrentLayer( nullptr )
{
QBoxLayout* layout = new QVBoxLayout();
layout->setContentsMargins( 0, 0, 0, 0 );
Expand Down
8 changes: 4 additions & 4 deletions src/app/qgsmaptoolcircularstringradius.cpp
Expand Up @@ -26,10 +26,10 @@
#include <cmath>

QgsMapToolCircularStringRadius::QgsMapToolCircularStringRadius( QgsMapToolCapture* parentTool, QgsMapCanvas* canvas, CaptureMode mode )
: QgsMapToolAddCircularString( parentTool, canvas, mode ),
mTemporaryEndPoint( QgsPointV2() ),
mRadius( 0.0 ),
mRadiusSpinBox( nullptr )
: QgsMapToolAddCircularString( parentTool, canvas, mode )
, mTemporaryEndPoint( QgsPointV2() )
, mRadius( 0.0 )
, mRadiusSpinBox( nullptr )
{

}
Expand Down

0 comments on commit ccebd83

Please sign in to comment.