From 3d151ebd71e2f631d3001b5f0eb344c8d596b185 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 5 Mar 2020 00:41:54 -0800 Subject: [PATCH] Cleanup connectivity parts Removes unneeded casts from the connectivity algo. --- pcbnew/connectivity/connectivity_algo.cpp | 10 +++++----- pcbnew/connectivity/connectivity_algo.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pcbnew/connectivity/connectivity_algo.cpp b/pcbnew/connectivity/connectivity_algo.cpp index b957b1b316..fe05596698 100644 --- a/pcbnew/connectivity/connectivity_algo.cpp +++ b/pcbnew/connectivity/connectivity_algo.cpp @@ -137,7 +137,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem ) break; case PCB_PAD_T: - if( m_itemMap.find ( static_cast( aItem ) ) != m_itemMap.end() ) + if( m_itemMap.find ( aItem ) != m_itemMap.end() ) return false; add( m_itemList, static_cast( aItem ) ); @@ -146,7 +146,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem ) case PCB_TRACE_T: { - if( m_itemMap.find( static_cast( aItem ) ) != m_itemMap.end() ) + if( m_itemMap.find( aItem ) != m_itemMap.end() ) return false; add( m_itemList, static_cast( aItem ) ); @@ -156,7 +156,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem ) case PCB_ARC_T: { - if( m_itemMap.find( static_cast( aItem ) ) != m_itemMap.end() ) + if( m_itemMap.find( aItem ) != m_itemMap.end() ) return false; add( m_itemList, static_cast( aItem ) ); @@ -165,7 +165,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem ) } case PCB_VIA_T: - if( m_itemMap.find( static_cast( aItem ) ) != m_itemMap.end() ) + if( m_itemMap.find( aItem ) != m_itemMap.end() ) return false; add( m_itemList, static_cast( aItem ) ); @@ -176,7 +176,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem ) { auto zone = static_cast( aItem ); - if( m_itemMap.find( static_cast( aItem ) ) != m_itemMap.end() ) + if( m_itemMap.find( aItem ) != m_itemMap.end() ) return false; m_itemMap[zone] = ITEM_MAP_ENTRY(); diff --git a/pcbnew/connectivity/connectivity_algo.h b/pcbnew/connectivity/connectivity_algo.h index ad5cc30b6f..79537b099f 100644 --- a/pcbnew/connectivity/connectivity_algo.h +++ b/pcbnew/connectivity/connectivity_algo.h @@ -145,7 +145,7 @@ private: CN_LIST m_itemList; - std::unordered_map m_itemMap; + std::unordered_map m_itemMap; CLUSTERS m_connClusters; CLUSTERS m_ratsnestClusters;