Tidy consts for class D_PAD
Some accessors should be const: * IsFlipped * GetRoundRectRadiusRatio Returning a objects by value as const in these cases is not helpful, as all it does is prevent the caller moving from the return value, it just forces a copy. Some of thse functions come from base class overrides, those haven't been changed. * ShapePos * GetPadName * GetPackedPadName
This commit is contained in:
parent
4be2c79b87
commit
5cc2abaa2b
|
@ -120,7 +120,7 @@ LSET D_PAD::UnplatedHoleMask()
|
|||
return saved;
|
||||
}
|
||||
|
||||
bool D_PAD::IsFlipped()
|
||||
bool D_PAD::IsFlipped() const
|
||||
{
|
||||
if( GetParent() && GetParent()->GetLayer() == B_Cu )
|
||||
return true;
|
||||
|
@ -363,7 +363,7 @@ void D_PAD::AppendConfigs( PARAM_CFG_ARRAY* aResult )
|
|||
|
||||
|
||||
// Returns the position of the pad.
|
||||
const wxPoint D_PAD::ShapePos() const
|
||||
wxPoint D_PAD::ShapePos() const
|
||||
{
|
||||
if( m_Offset.x == 0 && m_Offset.y == 0 )
|
||||
return m_Pos;
|
||||
|
@ -378,7 +378,7 @@ const wxPoint D_PAD::ShapePos() const
|
|||
}
|
||||
|
||||
|
||||
const wxString D_PAD::GetPadName() const
|
||||
wxString D_PAD::GetPadName() const
|
||||
{
|
||||
wxString name;
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
* @return true if the pad has a footprint parent flipped
|
||||
* (on the back/bottom layer)
|
||||
*/
|
||||
bool IsFlipped();
|
||||
bool IsFlipped() const;
|
||||
|
||||
/**
|
||||
* Set the pad name (sometimes called pad number, although
|
||||
|
@ -124,7 +124,7 @@ public:
|
|||
* @return the pad name
|
||||
* the pad name is limited to 4 ASCII chars
|
||||
*/
|
||||
const wxString GetPadName() const;
|
||||
wxString GetPadName() const;
|
||||
|
||||
/**
|
||||
* @return the pad name in a wxUint32 which is possible
|
||||
|
@ -132,7 +132,7 @@ public:
|
|||
* The packed pad name should be used only to compare 2
|
||||
* pad names, not to try to print this name
|
||||
*/
|
||||
const wxUint32 GetPackedPadName() const { return m_NumPadName; }
|
||||
wxUint32 GetPackedPadName() const { return m_NumPadName; }
|
||||
|
||||
/**
|
||||
* Function IncrementPadName
|
||||
|
@ -430,7 +430,7 @@ public:
|
|||
return m_boundingRadius;
|
||||
}
|
||||
|
||||
const wxPoint ShapePos() const;
|
||||
wxPoint ShapePos() const;
|
||||
|
||||
/**
|
||||
* has meaning only for rounded rect pads
|
||||
|
@ -439,7 +439,7 @@ public:
|
|||
* Cannot be > 0.5
|
||||
* the normalized IPC-7351C value is 0.25
|
||||
*/
|
||||
double GetRoundRectRadiusRatio()
|
||||
double GetRoundRectRadiusRatio() const
|
||||
{
|
||||
return m_padRoundRectRadiusScale;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue