Cleanup connectivity parts

Removes unneeded casts from the connectivity algo.
This commit is contained in:
Seth Hillbrand 2020-03-05 00:41:54 -08:00
parent b0d9838fb4
commit 3d151ebd71
2 changed files with 6 additions and 6 deletions

View File

@ -137,7 +137,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
break; break;
case PCB_PAD_T: case PCB_PAD_T:
if( m_itemMap.find ( static_cast<D_PAD*>( aItem ) ) != m_itemMap.end() ) if( m_itemMap.find ( aItem ) != m_itemMap.end() )
return false; return false;
add( m_itemList, static_cast<D_PAD*>( aItem ) ); add( m_itemList, static_cast<D_PAD*>( aItem ) );
@ -146,7 +146,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
case PCB_TRACE_T: case PCB_TRACE_T:
{ {
if( m_itemMap.find( static_cast<TRACK*>( aItem ) ) != m_itemMap.end() ) if( m_itemMap.find( aItem ) != m_itemMap.end() )
return false; return false;
add( m_itemList, static_cast<TRACK*>( aItem ) ); add( m_itemList, static_cast<TRACK*>( aItem ) );
@ -156,7 +156,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
case PCB_ARC_T: case PCB_ARC_T:
{ {
if( m_itemMap.find( static_cast<ARC*>( aItem ) ) != m_itemMap.end() ) if( m_itemMap.find( aItem ) != m_itemMap.end() )
return false; return false;
add( m_itemList, static_cast<ARC*>( aItem ) ); add( m_itemList, static_cast<ARC*>( aItem ) );
@ -165,7 +165,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
} }
case PCB_VIA_T: case PCB_VIA_T:
if( m_itemMap.find( static_cast<VIA*>( aItem ) ) != m_itemMap.end() ) if( m_itemMap.find( aItem ) != m_itemMap.end() )
return false; return false;
add( m_itemList, static_cast<VIA*>( aItem ) ); add( m_itemList, static_cast<VIA*>( aItem ) );
@ -176,7 +176,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
{ {
auto zone = static_cast<ZONE_CONTAINER*>( aItem ); auto zone = static_cast<ZONE_CONTAINER*>( aItem );
if( m_itemMap.find( static_cast<ZONE_CONTAINER*>( aItem ) ) != m_itemMap.end() ) if( m_itemMap.find( aItem ) != m_itemMap.end() )
return false; return false;
m_itemMap[zone] = ITEM_MAP_ENTRY(); m_itemMap[zone] = ITEM_MAP_ENTRY();

View File

@ -145,7 +145,7 @@ private:
CN_LIST m_itemList; CN_LIST m_itemList;
std::unordered_map<const BOARD_CONNECTED_ITEM*, ITEM_MAP_ENTRY> m_itemMap; std::unordered_map<const BOARD_ITEM*, ITEM_MAP_ENTRY> m_itemMap;
CLUSTERS m_connClusters; CLUSTERS m_connClusters;
CLUSTERS m_ratsnestClusters; CLUSTERS m_ratsnestClusters;