Skip to content

Commit c3f4bef

Browse files
committed
fix nightly build and cppcheck in qwtpolar-0.1 (followup 0d2c564)
1 parent 569e571 commit c3f4bef

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/app/gps/qwtpolar-1.0/qwt_polar_grid.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ int QwtPolarGrid::marginHint() const
10481048
*/
10491049
const QwtScaleDraw *QwtPolarGrid::scaleDraw( int axisId ) const
10501050
{
1051-
if ( axisId >= QwtPolar::AxisLeft || axisId <= QwtPolar::AxisBottom )
1051+
if ( axisId >= QwtPolar::AxisLeft && axisId <= QwtPolar::AxisBottom )
10521052
return static_cast<QwtScaleDraw *>( d_data->axisData[axisId].scaleDraw );
10531053

10541054
return NULL;
@@ -1063,7 +1063,7 @@ const QwtScaleDraw *QwtPolarGrid::scaleDraw( int axisId ) const
10631063
*/
10641064
QwtScaleDraw *QwtPolarGrid::scaleDraw( int axisId )
10651065
{
1066-
if ( axisId >= QwtPolar::AxisLeft || axisId <= QwtPolar::AxisBottom )
1066+
if ( axisId >= QwtPolar::AxisLeft && axisId <= QwtPolar::AxisBottom )
10671067
return static_cast<QwtScaleDraw *>( d_data->axisData[axisId].scaleDraw );
10681068

10691069
return NULL;

src/app/gps/qwtpolar-1.0/qwt_polar_renderer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ void QwtPolarRenderer::render( QwtPolarPlot *plot,
302302
renderLegend( painter, layout->legendRect() );
303303
painter->restore();
304304

305-
const QRectF canvasRect = layout->canvasRect();
305+
const QRectF &canvasRect = layout->canvasRect();
306306

307307
painter->save();
308308
painter->setClipRect( canvasRect );

src/plugins/dxf2shp_converter/shapelib-1.2.10/shpopen.c

+1
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ SHPCreate( const char * pszLayer, int nShapeType )
669669
{
670670
free( pszBasename );
671671
free( pszFullname );
672+
fclose( fpSHP );
672673
return( NULL );
673674
}
674675

src/plugins/globe/osgEarthUtil/Controls.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -1799,20 +1799,19 @@ ControlNodeBin::draw( const ControlContext& context, bool newContext, int bin )
17991799

18001800
if ( _sortingEnabled && _sortByDistance )
18011801
{
1802-
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); )
1802+
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); ++i )
18031803
{
18041804
ControlNode* node = i->second.get();
18051805
if ( node->getNumParents() == 0 )
18061806
{
18071807
_renderNodes.erase( node );
1808-
i = _controlNodes.erase( i );
1808+
_controlNodes.erase( i );
18091809
}
18101810
else
1811-
{
1812-
ControlNode::PerViewData& nodeData = node->getData( context._view );
1813-
byDepth.insert( ControlNodePair(nodeData._screenPos.z(), node) );
1814-
++i;
1815-
}
1811+
{
1812+
ControlNode::PerViewData& nodeData = node->getData( context._view );
1813+
byDepth.insert( ControlNodePair(nodeData._screenPos.z(), node) );
1814+
}
18161815
}
18171816

18181817
drawList = &byDepth;

0 commit comments

Comments
 (0)