7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Move SetLayerSet to const reference

Avoids potential performance inefficiencies
This commit is contained in:
Seth Hillbrand 2024-08-17 07:55:32 -07:00
parent 54a34b2e7d
commit b6c1a3ba63
6 changed files with 6 additions and 6 deletions

View File

@ -250,7 +250,7 @@ public:
return LSET( m_layer );
}
virtual void SetLayerSet( LSET aLayers )
virtual void SetLayerSet( const LSET& aLayers )
{
if( aLayers.count() == 1 )
{

View File

@ -384,7 +384,7 @@ public:
m_polyDirty[ERROR_OUTSIDE] = true;
}
void SetLayerSet( LSET aLayers ) override { m_padStack.SetLayerSet( aLayers ); }
void SetLayerSet( const LSET& aLayers ) override { m_padStack.SetLayerSet( aLayers ); }
LSET GetLayerSet() const override { return m_padStack.LayerSet(); }
void SetAttribute( PAD_ATTRIB aAttribute );

View File

@ -917,7 +917,7 @@ LSET PCB_VIA::GetLayerSet() const
}
void PCB_VIA::SetLayerSet( LSET aLayerSet )
void PCB_VIA::SetLayerSet( const LSET& aLayerSet )
{
bool first = true;

View File

@ -418,7 +418,7 @@ public:
* Note SetLayerSet() initialize the first and last copper layers connected by the via.
* So currently SetLayerSet ignore non copper layers
*/
virtual void SetLayerSet( LSET aLayers ) override;
virtual void SetLayerSet( const LSET& aLayers ) override;
/**
* For a via m_layer contains the top layer, the other layer is in m_bottomLayer/

View File

@ -282,7 +282,7 @@ void ZONE::SetLayer( PCB_LAYER_ID aLayer )
}
void ZONE::SetLayerSet( LSET aLayerSet )
void ZONE::SetLayerSet( const LSET& aLayerSet )
{
if( aLayerSet.count() == 0 )
return;

View File

@ -126,7 +126,7 @@ public:
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
wxString GetFriendlyName() const override;
void SetLayerSet( LSET aLayerSet ) override;
void SetLayerSet( const LSET& aLayerSet ) override;
virtual LSET GetLayerSet() const override { return m_layerSet; }
const wxString& GetZoneName() const { return m_zoneName; }