diff --git a/include/board_item.h b/include/board_item.h index 9b298d1670..07918cb5b7 100644 --- a/include/board_item.h +++ b/include/board_item.h @@ -250,7 +250,7 @@ public: return LSET( m_layer ); } - virtual void SetLayerSet( LSET aLayers ) + virtual void SetLayerSet( const LSET& aLayers ) { if( aLayers.count() == 1 ) { diff --git a/pcbnew/pad.h b/pcbnew/pad.h index d655451228..268fa2b41d 100644 --- a/pcbnew/pad.h +++ b/pcbnew/pad.h @@ -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 ); diff --git a/pcbnew/pcb_track.cpp b/pcbnew/pcb_track.cpp index 5b41044b51..960c15f6e7 100644 --- a/pcbnew/pcb_track.cpp +++ b/pcbnew/pcb_track.cpp @@ -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; diff --git a/pcbnew/pcb_track.h b/pcbnew/pcb_track.h index e38c14e1f5..3ffd6b46f4 100644 --- a/pcbnew/pcb_track.h +++ b/pcbnew/pcb_track.h @@ -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/ diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index e2da8c1212..8935edda50 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -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; diff --git a/pcbnew/zone.h b/pcbnew/zone.h index a682d1b6a6..5f3d0e9366 100644 --- a/pcbnew/zone.h +++ b/pcbnew/zone.h @@ -126,7 +126,7 @@ public: void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& 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; }