Code formatting and warning fixes
This commit is contained in:
parent
3aaf26da2e
commit
72eff0941e
|
@ -756,13 +756,18 @@ void BOARD::SetElementVisibility( GAL_LAYER_ID LAYER_aPCB, bool isEnabled )
|
|||
// because we have a tool to show/hide ratsnest relative to a pad or a module
|
||||
// so the hide/show option is a per item selection
|
||||
|
||||
for ( int net = 1; net < GetNetCount(); net++ )
|
||||
for( unsigned int net = 1; net < GetNetCount(); net++ )
|
||||
GetConnectivity()->GetRatsnestForNet( net )->SetVisible( visible );
|
||||
for ( auto track : Tracks() )
|
||||
|
||||
for( auto track : Tracks() )
|
||||
track->SetLocalRatsnestVisible( isEnabled );
|
||||
|
||||
for( auto mod : Modules() )
|
||||
for ( auto pad : mod->Pads() )
|
||||
{
|
||||
for( auto pad : mod->Pads() )
|
||||
pad->SetLocalRatsnestVisible( isEnabled );
|
||||
}
|
||||
|
||||
for( int i = 0; i<GetAreaCount(); i++ )
|
||||
{
|
||||
auto zone = GetArea( i );
|
||||
|
@ -773,6 +778,7 @@ void BOARD::SetElementVisibility( GAL_LAYER_ID LAYER_aPCB, bool isEnabled )
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
|
|
@ -443,7 +443,7 @@ unsigned int CONNECTIVITY_DATA::GetNodeCount( int aNet ) const
|
|||
for( const auto& net : m_nets )
|
||||
sum += net->GetNodeCount();
|
||||
}
|
||||
else if( aNet < m_nets.size() )
|
||||
else if( aNet < (int) m_nets.size() )
|
||||
{
|
||||
sum = m_nets[aNet]->GetNodeCount();
|
||||
}
|
||||
|
|
|
@ -831,7 +831,7 @@ void CN_CONNECTIVITY_ALGO::markNetAsDirty( int aNet )
|
|||
if( aNet <= 0 )
|
||||
return;
|
||||
|
||||
if(m_dirtyNets.size() <= aNet )
|
||||
if( (int) m_dirtyNets.size() <= aNet )
|
||||
m_dirtyNets.resize( aNet + 1 );
|
||||
|
||||
m_dirtyNets[aNet] = true;
|
||||
|
|
|
@ -574,8 +574,8 @@ public:
|
|||
return m_cachedPoly->BBox();
|
||||
}
|
||||
|
||||
virtual int AnchorCount() const;
|
||||
virtual const VECTOR2I GetAnchor( int n ) const;
|
||||
virtual int AnchorCount() const override;
|
||||
virtual const VECTOR2I GetAnchor( int n ) const override;
|
||||
|
||||
private:
|
||||
std::vector<VECTOR2I> m_testOutlinePoints;
|
||||
|
|
|
@ -1451,8 +1451,8 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
|
|||
SetToolID( id, wxCURSOR_PENCIL, _( "Add tracks" ) );
|
||||
else
|
||||
SetToolID( id, wxCURSOR_QUESTION_ARROW, _( "Add tracks" ) );
|
||||
Compile_Ratsnest( &dc, true );
|
||||
|
||||
Compile_Ratsnest( &dc, true );
|
||||
break;
|
||||
|
||||
case ID_PCB_MODULE_BUTT:
|
||||
|
|
|
@ -248,7 +248,7 @@ public:
|
|||
mstEdges.emplace_back( src, dst, getDistance( src, dst ) );
|
||||
}
|
||||
|
||||
for( int i = 0; i < anchorChains.size(); i++ )
|
||||
for( unsigned int i = 0; i < anchorChains.size(); i++ )
|
||||
{
|
||||
auto& chain = anchorChains[i];
|
||||
|
||||
|
@ -260,7 +260,7 @@ public:
|
|||
return a->GetCluster().get() < b->GetCluster().get();
|
||||
} );
|
||||
|
||||
for( auto j = 1; j < chain.size(); j++ )
|
||||
for( unsigned int j = 1; j < chain.size(); j++ )
|
||||
{
|
||||
const auto& prevNode = chain[j - 1];
|
||||
const auto& curNode = chain[j];
|
||||
|
@ -368,7 +368,7 @@ void RN_NET::AddCluster( CN_CLUSTER_PTR aCluster )
|
|||
{
|
||||
bool isZone = dynamic_cast<CN_ZONE*>(item) != nullptr;
|
||||
auto& anchors = item->Anchors();
|
||||
int nAnchors = isZone ? 1 : anchors.size();
|
||||
unsigned int nAnchors = isZone ? 1 : anchors.size();
|
||||
|
||||
if( nAnchors > anchors.size() )
|
||||
nAnchors = anchors.size();
|
||||
|
@ -376,7 +376,7 @@ void RN_NET::AddCluster( CN_CLUSTER_PTR aCluster )
|
|||
//printf("item %p anchors : %d\n", item, anchors.size() );
|
||||
//printf("add item %p anchors : %d net : %d\n", item, item->Anchors().size(), item->Parent()->GetNetCode() );
|
||||
|
||||
for( int i = 0; i < nAnchors; i++ )
|
||||
for( unsigned int i = 0; i < nAnchors; i++ )
|
||||
{
|
||||
// printf("add anchor %p\n", anchors[i].get() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue