Skip to content

Commit

Permalink
fix cppcheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 7, 2015
1 parent 205b136 commit dc93261
Show file tree
Hide file tree
Showing 37 changed files with 165 additions and 114 deletions.
2 changes: 2 additions & 0 deletions src/app/main.cpp
Expand Up @@ -251,6 +251,8 @@ static void dumpBacktrace( unsigned int depth )
}

qgsFree( symbol );
#else
Q_UNUSED( depth );
#endif
}

Expand Down
6 changes: 4 additions & 2 deletions src/plugins/compass/qgscompassplugin.cpp
Expand Up @@ -48,9 +48,11 @@ static const QString sPluginIcon = ":/compass.svn";
QgsCompassPlugin::QgsCompassPlugin( QgisInterface *themQGisIface )
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
, mQGisIface( themQGisIface )
, mActionRunCompass( 0 )
, mActionAboutCompass( 0 )
, mQgsCompassPluginGui( 0 )
, mDock( 0 )
{
/** Initialize the plugin */
mDock = NULL;
}

QgsCompassPlugin::~QgsCompassPlugin()
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/compass/qgscompassplugin.h
Expand Up @@ -85,8 +85,6 @@ class QgsCompassPlugin: public QObject, public QgisPlugin, private Ui::QgsCompas
QString pluginDescriptionQString;
//! Category of the plugin
QString pluginCategoryQString;
//! Plugin type as defined in Plugin::PLUGINTYPE
int pluginType;
//! Pointer to the QGIS interface object
QgisInterface *mQGisIface;
//! Pointer to the QAction object used in the menu and toolbar
Expand Down
1 change: 1 addition & 0 deletions src/plugins/coordinate_capture/coordinatecapture.cpp
Expand Up @@ -75,6 +75,7 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface )
, mypCRSLabel( NULL )
, mCanvasDisplayPrecision( 5 )
, mQGisIface( theQgisInterface )
, mUserCrsDisplayPrecision( 5 )
, mQActionPointer( NULL )
{
}
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/dxf2shp_converter/builder.cpp
Expand Up @@ -43,7 +43,12 @@ Builder::Builder( std::string theFname,
, fetchedprims( 0 )
, fetchedtexts( 0 )
, ignoringBlock( false )
, current_polyline_willclose( false )
, store_next_vertex_for_polyline_close( false )
, current_polyline_pointcount( 0 )
, closePolyX( 0.0 )
, closePolyY( 0.0 )
, closePolyZ( 0.0 )
, currentBlockX( 0.0 )
, currentBlockY( 0.0 )
{
Expand Down
1 change: 0 additions & 1 deletion src/plugins/dxf2shp_converter/dxf2shpconverter.h
Expand Up @@ -73,7 +73,6 @@ class dxf2shpConverter: public QObject, public QgisPlugin
//
////////////////////////////////////////////////////////////////////

int mPluginType;
//! Pointer to the QGIS interface object
QgisInterface *mQGisIface;
//!pointer to the qaction for this plugin
Expand Down
1 change: 0 additions & 1 deletion src/plugins/georeferencer/qgsgeorefplugin.h
Expand Up @@ -103,7 +103,6 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin
//
////////////////////////////////////////////////////////////////////

int mPluginType;
//! Pointer to the QGIS interface object
QgisInterface *mQGisIface;
//!pointer to the qaction for this plugin
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/georeferencer/qgsgeoreftransform.cpp
Expand Up @@ -35,7 +35,7 @@ using std::pow;
class QgsLinearGeorefTransform : public QgsGeorefTransformInterface
{
public:
QgsLinearGeorefTransform() {}
QgsLinearGeorefTransform() : mParameters() {}
~QgsLinearGeorefTransform() {}

bool getOriginScale( QgsPoint &origin, double &scaleX, double &scaleY ) const;
Expand All @@ -62,7 +62,7 @@ class QgsLinearGeorefTransform : public QgsGeorefTransformInterface
class QgsHelmertGeorefTransform : public QgsGeorefTransformInterface
{
public:
QgsHelmertGeorefTransform() {}
QgsHelmertGeorefTransform() : mHelmertParameters() {}
struct HelmertParameters
{
QgsPoint origin;
Expand Down Expand Up @@ -115,7 +115,7 @@ class QgsGDALGeorefTransform : public QgsGeorefTransformInterface
class QgsProjectiveGeorefTransform : public QgsGeorefTransformInterface
{
public:
QgsProjectiveGeorefTransform() {}
QgsProjectiveGeorefTransform() : mParameters() {}
~QgsProjectiveGeorefTransform() {}

bool updateParametersFromGCPs( const std::vector<QgsPoint> &mapCoords, const std::vector<QgsPoint> &pixelCoords ) override;
Expand Down
6 changes: 5 additions & 1 deletion src/plugins/georeferencer/qgsrasterchangecoords.cpp
Expand Up @@ -27,8 +27,12 @@
#endif

QgsRasterChangeCoords::QgsRasterChangeCoords()
: mHasCrs( false )
, mUL_X( 0. )
, mUL_Y( 0. )
, mResX( 1. )
, mResY( 1. )
{
mHasCrs = false;
}

void QgsRasterChangeCoords::setRaster( const QString &fileRaster )
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -128,6 +128,11 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
, mTileSource( 0 )
, mElevationManager( 0 )
, mObjectPlacer( 0 )
, mControlCanvas( 0 )
, mSelectedLat( 0. )
, mSelectedLon( 0. )
, mSelectedElevation( 0. )
, mRootNode( 0 )
{
mIsGlobeRunning = false;
//needed to be "seen" by other plugins by doing
Expand Down
1 change: 0 additions & 1 deletion src/plugins/globe/globe_plugin.h
Expand Up @@ -135,7 +135,6 @@ class GlobePlugin : public QObject, public QgisPlugin
void setupControls();

private://! Checks if the globe is open
int mPluginType;
//! Pointer to the QGIS interface object
QgisInterface *mQGisIface;
//!pointer to the qaction for this plugin
Expand Down

0 comments on commit dc93261

Please sign in to comment.