Skip to content

Commit dc93261

Browse files
committed
fix cppcheck issues
1 parent 205b136 commit dc93261

37 files changed

+165
-114
lines changed

src/app/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ static void dumpBacktrace( unsigned int depth )
251251
}
252252

253253
qgsFree( symbol );
254+
#else
255+
Q_UNUSED( depth );
254256
#endif
255257
}
256258

src/plugins/compass/qgscompassplugin.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ static const QString sPluginIcon = ":/compass.svn";
4848
QgsCompassPlugin::QgsCompassPlugin( QgisInterface *themQGisIface )
4949
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
5050
, mQGisIface( themQGisIface )
51+
, mActionRunCompass( 0 )
52+
, mActionAboutCompass( 0 )
53+
, mQgsCompassPluginGui( 0 )
54+
, mDock( 0 )
5155
{
52-
/** Initialize the plugin */
53-
mDock = NULL;
5456
}
5557

5658
QgsCompassPlugin::~QgsCompassPlugin()

src/plugins/compass/qgscompassplugin.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ class QgsCompassPlugin: public QObject, public QgisPlugin, private Ui::QgsCompas
8585
QString pluginDescriptionQString;
8686
//! Category of the plugin
8787
QString pluginCategoryQString;
88-
//! Plugin type as defined in Plugin::PLUGINTYPE
89-
int pluginType;
9088
//! Pointer to the QGIS interface object
9189
QgisInterface *mQGisIface;
9290
//! Pointer to the QAction object used in the menu and toolbar

src/plugins/coordinate_capture/coordinatecapture.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface )
7575
, mypCRSLabel( NULL )
7676
, mCanvasDisplayPrecision( 5 )
7777
, mQGisIface( theQgisInterface )
78+
, mUserCrsDisplayPrecision( 5 )
7879
, mQActionPointer( NULL )
7980
{
8081
}

src/plugins/dxf2shp_converter/builder.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ Builder::Builder( std::string theFname,
4343
, fetchedprims( 0 )
4444
, fetchedtexts( 0 )
4545
, ignoringBlock( false )
46+
, current_polyline_willclose( false )
47+
, store_next_vertex_for_polyline_close( false )
4648
, current_polyline_pointcount( 0 )
49+
, closePolyX( 0.0 )
50+
, closePolyY( 0.0 )
51+
, closePolyZ( 0.0 )
4752
, currentBlockX( 0.0 )
4853
, currentBlockY( 0.0 )
4954
{

src/plugins/dxf2shp_converter/dxf2shpconverter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class dxf2shpConverter: public QObject, public QgisPlugin
7373
//
7474
////////////////////////////////////////////////////////////////////
7575

76-
int mPluginType;
7776
//! Pointer to the QGIS interface object
7877
QgisInterface *mQGisIface;
7978
//!pointer to the qaction for this plugin

src/plugins/georeferencer/qgsgeorefplugin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin
103103
//
104104
////////////////////////////////////////////////////////////////////
105105

106-
int mPluginType;
107106
//! Pointer to the QGIS interface object
108107
QgisInterface *mQGisIface;
109108
//!pointer to the qaction for this plugin

src/plugins/georeferencer/qgsgeoreftransform.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ using std::pow;
3535
class QgsLinearGeorefTransform : public QgsGeorefTransformInterface
3636
{
3737
public:
38-
QgsLinearGeorefTransform() {}
38+
QgsLinearGeorefTransform() : mParameters() {}
3939
~QgsLinearGeorefTransform() {}
4040

4141
bool getOriginScale( QgsPoint &origin, double &scaleX, double &scaleY ) const;
@@ -62,7 +62,7 @@ class QgsLinearGeorefTransform : public QgsGeorefTransformInterface
6262
class QgsHelmertGeorefTransform : public QgsGeorefTransformInterface
6363
{
6464
public:
65-
QgsHelmertGeorefTransform() {}
65+
QgsHelmertGeorefTransform() : mHelmertParameters() {}
6666
struct HelmertParameters
6767
{
6868
QgsPoint origin;
@@ -115,7 +115,7 @@ class QgsGDALGeorefTransform : public QgsGeorefTransformInterface
115115
class QgsProjectiveGeorefTransform : public QgsGeorefTransformInterface
116116
{
117117
public:
118-
QgsProjectiveGeorefTransform() {}
118+
QgsProjectiveGeorefTransform() : mParameters() {}
119119
~QgsProjectiveGeorefTransform() {}
120120

121121
bool updateParametersFromGCPs( const std::vector<QgsPoint> &mapCoords, const std::vector<QgsPoint> &pixelCoords ) override;

src/plugins/georeferencer/qgsrasterchangecoords.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@
2727
#endif
2828

2929
QgsRasterChangeCoords::QgsRasterChangeCoords()
30+
: mHasCrs( false )
31+
, mUL_X( 0. )
32+
, mUL_Y( 0. )
33+
, mResX( 1. )
34+
, mResY( 1. )
3035
{
31-
mHasCrs = false;
3236
}
3337

3438
void QgsRasterChangeCoords::setRaster( const QString &fileRaster )

src/plugins/globe/globe_plugin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
128128
, mTileSource( 0 )
129129
, mElevationManager( 0 )
130130
, mObjectPlacer( 0 )
131+
, mControlCanvas( 0 )
132+
, mSelectedLat( 0. )
133+
, mSelectedLon( 0. )
134+
, mSelectedElevation( 0. )
135+
, mRootNode( 0 )
131136
{
132137
mIsGlobeRunning = false;
133138
//needed to be "seen" by other plugins by doing

src/plugins/globe/globe_plugin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ class GlobePlugin : public QObject, public QgisPlugin
135135
void setupControls();
136136

137137
private://! Checks if the globe is open
138-
int mPluginType;
139138
//! Pointer to the QGIS interface object
140139
QgisInterface *mQGisIface;
141140
//!pointer to the qaction for this plugin

0 commit comments

Comments
 (0)