Skip to content
Permalink
Browse files

fix cppcheck issues

  • Loading branch information
jef-n committed Feb 7, 2015
1 parent 205b136 commit dc93261ce5e2e557794fb0f099256cb21ef97d1e
Showing with 165 additions and 114 deletions.
  1. +2 −0 src/app/main.cpp
  2. +4 −2 src/plugins/compass/qgscompassplugin.cpp
  3. +0 −2 src/plugins/compass/qgscompassplugin.h
  4. +1 −0 src/plugins/coordinate_capture/coordinatecapture.cpp
  5. +5 −0 src/plugins/dxf2shp_converter/builder.cpp
  6. +0 −1 src/plugins/dxf2shp_converter/dxf2shpconverter.h
  7. +0 −1 src/plugins/georeferencer/qgsgeorefplugin.h
  8. +3 −3 src/plugins/georeferencer/qgsgeoreftransform.cpp
  9. +5 −1 src/plugins/georeferencer/qgsrasterchangecoords.cpp
  10. +5 −0 src/plugins/globe/globe_plugin.cpp
  11. +0 −1 src/plugins/globe/globe_plugin.h
  12. +53 −61 src/plugins/grass/qgsgrassmapcalc.cpp
  13. +3 −3 src/plugins/grass/qgsgrassmapcalc.h
  14. +1 −0 src/plugins/grass/qgsgrassmodel.cpp
  15. +4 −2 src/plugins/grass/qgsgrassmodule.cpp
  16. +33 −18 src/plugins/grass/qgsgrassplugin.cpp
  17. +1 −3 src/plugins/grass/qgsgrassplugin.h
  18. +9 −1 src/plugins/grass/qgsgrassutils.cpp
  19. +1 −0 src/plugins/heatmap/heatmap.cpp
  20. +0 −1 src/plugins/heatmap/heatmap.h
  21. +2 −2 src/plugins/heatmap/heatmapgui.cpp
  22. +0 −1 src/plugins/offline_editing/offline_editing_plugin.h
  23. +2 −2 src/plugins/roadgraph/roadgraphplugin.cpp
  24. +0 −1 src/plugins/roadgraph/roadgraphplugin.h
  25. +0 −1 src/plugins/spit/qgsspit.h
  26. +0 −2 src/plugins/spit/qgsspitplugin.h
  27. +0 −1 src/plugins/topology/topol.h
  28. +2 −0 src/providers/gpx/gpsdata.cpp
  29. +10 −1 src/providers/grass/qgsgrassgislib.h
  30. +3 −0 src/providers/mssql/qgsmssqldataitems.cpp
  31. +2 −0 src/providers/oracle/ocispatial/qsql_ocispatial.cpp
  32. +1 −0 src/providers/postgres/qgscolumntypethread.cpp
  33. +2 −1 src/providers/wcs/qgswcscapabilities.cpp
  34. +1 −0 src/providers/wms/qgswmscapabilities.cpp
  35. +4 −1 src/server/qgsrequesthandler.h
  36. +4 −1 src/server/qgswfsserver.cpp
  37. +2 −0 src/server/qgswmsserver.cpp
@@ -251,6 +251,8 @@ static void dumpBacktrace( unsigned int depth )
}

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

@@ -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()
@@ -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
@@ -75,6 +75,7 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface )
, mypCRSLabel( NULL )
, mCanvasDisplayPrecision( 5 )
, mQGisIface( theQgisInterface )
, mUserCrsDisplayPrecision( 5 )
, mQActionPointer( NULL )
{
}
@@ -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 )
{
@@ -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
@@ -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
@@ -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;
@@ -62,7 +62,7 @@ class QgsLinearGeorefTransform : public QgsGeorefTransformInterface
class QgsHelmertGeorefTransform : public QgsGeorefTransformInterface
{
public:
QgsHelmertGeorefTransform() {}
QgsHelmertGeorefTransform() : mHelmertParameters() {}
struct HelmertParameters
{
QgsPoint origin;
@@ -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;
@@ -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 )
@@ -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
@@ -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

0 comments on commit dc93261

Please sign in to comment.
You can’t perform that action at this time.