Fix build errors; warnings
(somehow, the previous version compiles on my machine...)
This commit is contained in:
parent
5aa8af1abf
commit
1acb1afa98
|
@ -1138,20 +1138,14 @@ void BOARD::RemoveAll( std::initializer_list<KICAD_T> aTypes )
|
|||
{
|
||||
std::vector<BOARD_ITEM*> removed;
|
||||
|
||||
if( aTypes.size() == 1 && *aTypes.begin() == TYPE_NOT_INIT )
|
||||
{
|
||||
aTypes = {
|
||||
PCB_NETINFO_T, PCB_MARKER_T, PCB_GROUP_T, PCB_ZONE_T, PCB_GENERATOR_T, PCB_FOOTPRINT_T,
|
||||
PCB_TRACE_T, PCB_SHAPE_T
|
||||
};
|
||||
}
|
||||
|
||||
for( const KICAD_T& type : aTypes )
|
||||
{
|
||||
switch( type )
|
||||
{
|
||||
case PCB_NETINFO_T:
|
||||
std::copy( m_NetInfo.begin(), m_NetInfo.end(), std::back_inserter( removed ) );
|
||||
for( NETINFO_ITEM* item : m_NetInfo )
|
||||
removed.emplace_back( item );
|
||||
|
||||
m_NetInfo.clear();
|
||||
break;
|
||||
|
||||
|
|
|
@ -390,7 +390,10 @@ public:
|
|||
* granular than that, use BOARD::Remove.
|
||||
* @param aTypes is a list of one or more types to remove, or leave default to remove all
|
||||
*/
|
||||
void RemoveAll( std::initializer_list<KICAD_T> aTypes = { TYPE_NOT_INIT } );
|
||||
void RemoveAll( std::initializer_list<KICAD_T> aTypes = { PCB_NETINFO_T, PCB_MARKER_T,
|
||||
PCB_GROUP_T, PCB_ZONE_T,
|
||||
PCB_GENERATOR_T, PCB_FOOTPRINT_T,
|
||||
PCB_TRACE_T, PCB_SHAPE_T } );
|
||||
|
||||
/**
|
||||
* Must be used if Add() is used using a BULK_x ADD_MODE to generate a change event for
|
||||
|
|
|
@ -849,7 +849,6 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
|||
wxT( " • " ) + rcItem->GetErrorText() );
|
||||
|
||||
BOARD* board = m_frame->GetBoard();
|
||||
const std::vector<PCB_MARKER*>& markers = board->Markers();
|
||||
|
||||
std::vector<BOARD_ITEM*> toRemove;
|
||||
|
||||
|
|
Loading…
Reference in New Issue