Browse Source

Optimize itemset

When counting items, many cases exist where we want to count all items
without checking flags.  This short-circuits the loop to provide the
immediate count.
pull/17/head
Seth Hillbrand 8 years ago
parent
commit
dbc2eea3db
  1. 3
      pcbnew/router/pns_itemset.h

3
pcbnew/router/pns_itemset.h

@ -120,6 +120,9 @@ public:
{
int n = 0;
if( aKindMask == -1 || aKindMask == ITEM::ANY_T )
return m_items.size();
for( ITEM* item : m_items )
{
if( item->Kind() & aKindMask )

Loading…
Cancel
Save