Revert "Schematic performance enhancements"

This reverts commit df654ac12f.
This commit is contained in:
Seth Hillbrand 2024-02-01 09:00:13 +01:00
parent df654ac12f
commit 7664c345e2
4 changed files with 14 additions and 9 deletions

View File

@ -863,8 +863,15 @@ void CONNECTION_GRAPH::removeSubgraphs( std::set<CONNECTION_SUBGRAPH*>& aSubgrap
++it;
}
for( auto it : sg->GetItems() )
m_item_to_subgraph_map.erase( it );
for( auto it = m_item_to_subgraph_map.begin(); it != m_item_to_subgraph_map.end(); )
{
if( it->second == sg )
it = m_item_to_subgraph_map.erase( it );
else
++it;
}
}
for( auto it = m_net_name_to_code_map.begin(); it != m_net_name_to_code_map.end(); )

View File

@ -1045,7 +1045,6 @@ void LIB_SYMBOL::GetPins( LIB_PINS& aList, int aUnit, int aBodyStyle ) const
LIB_SYMBOL_SPTR parent = m_parent.lock();
const LIB_ITEMS_CONTAINER& drawItems = parent ? parent->m_drawings : m_drawings;
aList.reserve( drawItems.size( LIB_PIN_T ) );
for( const LIB_ITEM& item : drawItems[LIB_PIN_T] )
{

View File

@ -182,15 +182,14 @@ public:
bool IsStrokeEquivalent( const SCH_LINE* aLine )
{
const STROKE_PARAMS other_stroke = aLine->GetStroke();
if( m_stroke.GetWidth() != other_stroke.GetWidth() )
if( m_stroke.GetWidth() != aLine->GetStroke().GetWidth() )
return false;
if( m_stroke.GetColor() != other_stroke.GetColor() )
if( m_stroke.GetColor() != aLine->GetStroke().GetColor() )
return false;
LINE_STYLE style_a = m_stroke.GetLineStyle();
LINE_STYLE style_b = other_stroke.GetLineStyle();
LINE_STYLE style_b = aLine->GetStroke().GetLineStyle();
return style_a == style_b
|| ( style_a == LINE_STYLE::DEFAULT && style_b == LINE_STYLE::SOLID )

View File

@ -2040,7 +2040,6 @@ bool SCH_SYMBOL::Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) c
void SCH_SYMBOL::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
{
aItemList.reserve( m_pins.size() );
for( auto& pin : m_pins )
{
LIB_PIN* lib_pin = pin->GetLibPin();
@ -2048,7 +2047,8 @@ void SCH_SYMBOL::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
if( lib_pin && lib_pin->GetUnit() && m_unit && ( m_unit != lib_pin->GetUnit() ) )
continue;
aItemList.emplace_back( PIN_END, lib_pin, GetPinPhysicalPosition( lib_pin ), this );
DANGLING_END_ITEM item( PIN_END, lib_pin, GetPinPhysicalPosition( lib_pin ), this );
aItemList.push_back( item );
}
}