Fix a few Coverity warnings.

This commit is contained in:
jean-pierre charras 2023-05-12 17:57:03 +02:00
parent 2ffb58a7e2
commit 94bd1c6025
3 changed files with 7 additions and 2 deletions

View File

@ -27,6 +27,8 @@ NL_3D_VIEWER_PLUGIN::NL_3D_VIEWER_PLUGIN( EDA_3D_CANVAS* aViewport )
{ {
if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver ) if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver )
m_impl = new NL_3D_VIEWER_PLUGIN_IMPL( aViewport ); m_impl = new NL_3D_VIEWER_PLUGIN_IMPL( aViewport );
else
m_impl = nullptr;
} }

View File

@ -73,7 +73,10 @@ bool equals( glm::mat<L, C, T, Q> const& aFirst, glm::mat<L, C, T, Q> const& aSe
NL_3D_VIEWER_PLUGIN_IMPL::NL_3D_VIEWER_PLUGIN_IMPL( EDA_3D_CANVAS* aCanvas ) : NL_3D_VIEWER_PLUGIN_IMPL::NL_3D_VIEWER_PLUGIN_IMPL( EDA_3D_CANVAS* aCanvas ) :
NAV_3D( false, false ), m_canvas( aCanvas ), m_capIsMoving( false ) NAV_3D( false, false ),
m_canvas( aCanvas ),
m_capIsMoving( false ),
m_newWidth( 0.0 )
{ {
m_camera = dynamic_cast<TRACK_BALL*>( m_canvas->GetCamera() ); m_camera = dynamic_cast<TRACK_BALL*>( m_canvas->GetCamera() );

View File

@ -763,7 +763,7 @@ void CONNECTION_GRAPH::removeSubgraphs( std::set<CONNECTION_SUBGRAPH*>& aSubgrap
m_subgraphs.erase( it ); m_subgraphs.erase( it );
} }
for( auto el : m_sheet_to_subgraphs_map ) for( auto& el : m_sheet_to_subgraphs_map )
{ {
auto it = std::lower_bound( el.second.begin(), el.second.end(), sg ); auto it = std::lower_bound( el.second.begin(), el.second.end(), sg );