Loading pcbnew/ratsnest_data.cpp +35 −26 Original line number Diff line number Diff line Loading @@ -548,15 +548,17 @@ const RN_NODE_PTR RN_NET::GetClosestNode( const RN_NODE_PTR& aNode ) const for( it = nodes.begin(), itEnd = nodes.end(); it != itEnd; ++it ) { RN_NODE_PTR node = *it; // Obviously the distance between node and itself is the shortest, // that's why we have to skip it if( *it != aNode ) if( node != aNode ) { unsigned int distance = getDistance( *it, aNode ); unsigned int distance = getDistance( node, aNode ); if( distance < minDistance ) { minDistance = distance; closest = *it; closest = node; } } } Loading Loading @@ -650,6 +652,8 @@ std::list<RN_NODE_PTR> RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con { std::list<RN_NODE_PTR> nodes; try { switch( aItem->Type() ) { case PCB_PAD_T: Loading Loading @@ -679,6 +683,11 @@ std::list<RN_NODE_PTR> RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con default: break; } } catch ( ... ) { return nodes; } return nodes; } Loading Loading
pcbnew/ratsnest_data.cpp +35 −26 Original line number Diff line number Diff line Loading @@ -548,15 +548,17 @@ const RN_NODE_PTR RN_NET::GetClosestNode( const RN_NODE_PTR& aNode ) const for( it = nodes.begin(), itEnd = nodes.end(); it != itEnd; ++it ) { RN_NODE_PTR node = *it; // Obviously the distance between node and itself is the shortest, // that's why we have to skip it if( *it != aNode ) if( node != aNode ) { unsigned int distance = getDistance( *it, aNode ); unsigned int distance = getDistance( node, aNode ); if( distance < minDistance ) { minDistance = distance; closest = *it; closest = node; } } } Loading Loading @@ -650,6 +652,8 @@ std::list<RN_NODE_PTR> RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con { std::list<RN_NODE_PTR> nodes; try { switch( aItem->Type() ) { case PCB_PAD_T: Loading Loading @@ -679,6 +683,11 @@ std::list<RN_NODE_PTR> RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con default: break; } } catch ( ... ) { return nodes; } return nodes; } Loading