Coverity fixes.

This commit is contained in:
Jeff Young 2022-08-22 17:52:42 +01:00
parent f42b66bc1c
commit 638198251a
5 changed files with 9 additions and 6 deletions

View File

@ -33,7 +33,8 @@ class SCH_SCREEN;
class BUS_ALIAS
{
public:
BUS_ALIAS( SCH_SCREEN* aParent = nullptr )
BUS_ALIAS( SCH_SCREEN* aParent = nullptr ) :
m_parent( aParent )
{ }
~BUS_ALIAS()

View File

@ -27,7 +27,9 @@
PANEL_SETUP_BUSES::PANEL_SETUP_BUSES( wxWindow* aWindow, SCH_EDIT_FRAME* aFrame ) :
PANEL_SETUP_BUSES_BASE( aWindow ),
m_frame( aFrame )
m_frame( aFrame ),
m_errorGrid( nullptr ),
m_errorRow( -1 )
{
m_membersLabelTemplate = m_membersLabel->GetLabel();

View File

@ -917,7 +917,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadNets()
BUS bus = Schematic.Buses.at( busTerm.BusID );
if( !alg::contains( m_busesMap.at( bus.ID )->Members(), netName ) )
m_busesMap.at( bus.ID )->Members().push_back( netName );
m_busesMap.at( bus.ID )->Members().emplace_back( netName );
SCH_BUS_WIRE_ENTRY* busEntry =
new SCH_BUS_WIRE_ENTRY( getKiCadPoint( busTerm.FirstPoint ), false );

View File

@ -3716,7 +3716,7 @@ void SCH_SEXPR_PARSER::parseBusAlias( SCH_SCREEN* aScreen )
if( m_requiredVersion < 20210621 )
member = ConvertToNewOverbarNotation( member );
busAlias->Members().push_back( member );
busAlias->Members().emplace_back( member );
token = NextTok();
}

View File

@ -1375,8 +1375,8 @@ std::shared_ptr<BUS_ALIAS> SCH_LEGACY_PLUGIN::loadBusAlias( LINE_READER& aReader
buf.clear();
parseUnquotedString( buf, aReader, line, &line, true );
if( buf.Len() > 0 )
busAlias->Members().push_back( buf );
if( !buf.IsEmpty() )
busAlias->Members().emplace_back( buf );
}
return busAlias;