Skip to content

Commit 6ed695a

Browse files
committedFeb 7, 2015
remaining cppcheck issues
1 parent 2589b1a commit 6ed695a

10 files changed

+23
-10
lines changed
 

‎src/plugins/globe/osgEarthUtil/Controls.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,18 +1801,19 @@ ControlNodeBin::draw( const ControlContext& context, bool newContext, int bin )
18011801

18021802
if ( _sortingEnabled && _sortByDistance )
18031803
{
1804-
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); ++i )
1804+
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); )
18051805
{
18061806
ControlNode* node = i->second.get();
18071807
if ( node->getNumParents() == 0 )
18081808
{
18091809
_renderNodes.erase( node );
1810-
_controlNodes.erase( i );
1810+
_controlNodes.erase( i++ );
18111811
}
18121812
else
18131813
{
18141814
ControlNode::PerViewData& nodeData = node->getData( context._view );
18151815
byDepth.insert( ControlNodePair(nodeData._screenPos.z(), node) );
1816+
++i;
18161817
}
18171818
}
18181819

‎tests/src/core/testqgsatlascomposition.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class TestQgsAtlasComposition : public QObject
4444
, mLabel2( 0 )
4545
, mAtlasMap( 0 )
4646
, mOverview( 0 )
47+
, mVectorLayer( 0 )
48+
, mVectorLayer2( 0 )
49+
, mAtlas( 0 )
4750
{}
4851

4952
private slots:

‎tests/src/core/testqgsdiagram.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class TestQgsDiagram : public QObject
5353

5454
public:
5555
TestQgsDiagram()
56-
: mPointsLayer( 0 )
56+
: mTestHasError( false )
57+
, mPointsLayer( 0 )
5758
, mComposition( 0 )
5859
, mPieDiagram( 0 )
5960
, mComposerMap( 0 )

‎tests/src/core/testqgsdiagramexpression.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ class TestQgsDiagramExpression : public QObject
5252
Q_OBJECT
5353
public:
5454
TestQgsDiagramExpression()
55-
: mMapSettings( 0 )
55+
: mTestHasError( false )
56+
, mMapSettings( 0 )
5657
, mPointsLayer( 0 )
5758
, mComposition( 0 )
5859
, mPieDiagram( 0 )

‎tests/src/core/testqgsgradients.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class TestQgsGradients : public QObject
4646

4747
public:
4848
TestQgsGradients()
49-
: mpPolysLayer( 0 )
49+
: mTestHasError( false )
50+
, mpPolysLayer( 0 )
5051
, mGradientFill( 0 )
5152
, mFillSymbol( 0 )
5253
, mSymbolRenderer( 0 )

‎tests/src/core/testqgsrasterfill.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class TestQgsRasterFill : public QObject
4545

4646
public:
4747
TestQgsRasterFill()
48-
: mpPolysLayer( 0 )
48+
: mTestHasError( false )
49+
, mpPolysLayer( 0 )
4950
, mRasterFill( 0 )
5051
, mFillSymbol( 0 )
5152
, mSymbolRenderer( 0 )

‎tests/src/core/testqgsrenderers.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class TestQgsRenderers : public QObject
4242

4343
public:
4444
TestQgsRenderers()
45-
: mpPointsLayer( 0 )
45+
: mTestHasError( false )
46+
, mpPointsLayer( 0 )
4647
, mpLinesLayer( 0 )
4748
, mpPolysLayer( 0 )
4849
{}

‎tests/src/core/testqgsshapeburst.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class TestQgsShapeburst : public QObject
4545
Q_OBJECT
4646
public:
4747
TestQgsShapeburst()
48-
: mpPolysLayer()
48+
: mTestHasError( false )
49+
, mpPolysLayer()
4950
, mShapeburstFill( 0 )
5051
, mFillSymbol( 0 )
5152
, mSymbolRenderer( 0 )

‎tests/src/core/testqgsvectorlayer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ class TestQgsVectorLayer : public QObject
7272
Q_OBJECT
7373
public:
7474
TestQgsVectorLayer()
75-
: mpMapRenderer( 0 )
75+
: mTestHasError( false )
76+
, mpMapRenderer( 0 )
7677
, mpPointsLayer( 0 )
7778
, mpLinesLayer( 0 )
7879
, mpPolysLayer( 0 )

‎tests/src/gui/testqgsrasterhistogram.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@
3838
/** \ingroup UnitTests
3939
* This is a unit test to verify that raster histogram works
4040
*/
41-
class TestRasterHistogram: public QObject
41+
class TestRasterHistogram : public QObject
4242
{
4343
Q_OBJECT
4444

45+
TestRasterHistogram() {}
46+
4547
private:
4648

4749
QString mDataDir;

0 commit comments

Comments
 (0)
Please sign in to comment.