Skip to content
Permalink
Browse files

fix nightly build and cppcheck in qwtpolar-0.1 (followup 0d2c564)

  • Loading branch information
jef-n committed Jan 24, 2014
1 parent 569e571 commit c3f4befa3b36f2d2565c634666421509dcdecad1
@@ -1048,7 +1048,7 @@ int QwtPolarGrid::marginHint() const
*/
const QwtScaleDraw *QwtPolarGrid::scaleDraw( int axisId ) const
{
if ( axisId >= QwtPolar::AxisLeft || axisId <= QwtPolar::AxisBottom )
if ( axisId >= QwtPolar::AxisLeft && axisId <= QwtPolar::AxisBottom )
return static_cast<QwtScaleDraw *>( d_data->axisData[axisId].scaleDraw );

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

return NULL;
@@ -302,7 +302,7 @@ void QwtPolarRenderer::render( QwtPolarPlot *plot,
renderLegend( painter, layout->legendRect() );
painter->restore();

const QRectF canvasRect = layout->canvasRect();
const QRectF &canvasRect = layout->canvasRect();

painter->save();
painter->setClipRect( canvasRect );
@@ -669,6 +669,7 @@ SHPCreate( const char * pszLayer, int nShapeType )
{
free( pszBasename );
free( pszFullname );
fclose( fpSHP );
return( NULL );
}

@@ -1799,20 +1799,19 @@ ControlNodeBin::draw( const ControlContext& context, bool newContext, int bin )

if ( _sortingEnabled && _sortByDistance )
{
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); )
for( ControlNodeCollection::iterator i = _controlNodes.begin(); i != _controlNodes.end(); ++i )
{
ControlNode* node = i->second.get();
if ( node->getNumParents() == 0 )
{
_renderNodes.erase( node );
i = _controlNodes.erase( i );
_controlNodes.erase( i );
}
else
{
ControlNode::PerViewData& nodeData = node->getData( context._view );
byDepth.insert( ControlNodePair(nodeData._screenPos.z(), node) );
++i;
}
{
ControlNode::PerViewData& nodeData = node->getData( context._view );
byDepth.insert( ControlNodePair(nodeData._screenPos.z(), node) );
}
}

drawList = &byDepth;

0 comments on commit c3f4bef

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