Removed const modifier for returned non-reference types
This commit is contained in:
parent
509cd8f495
commit
89698a727b
|
@ -98,6 +98,8 @@ public:
|
|||
// Do not create a copy constructor & operator=.
|
||||
// The ones generated by the compiler are adequate.
|
||||
|
||||
virtual wxPoint GetPosition() const = 0;
|
||||
|
||||
/**
|
||||
* Function GetCenter()
|
||||
*
|
||||
|
@ -106,7 +108,7 @@ public:
|
|||
*
|
||||
* @return centre point of the item
|
||||
*/
|
||||
virtual const wxPoint GetCenter() const { return GetPosition(); }
|
||||
virtual wxPoint GetCenter() const { return GetPosition(); }
|
||||
|
||||
virtual void SetPosition( const wxPoint& aPos ) = 0;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ public:
|
|||
m_position = VECTOR2D( aPosition );
|
||||
}
|
||||
|
||||
inline const wxPoint GetPosition() const override
|
||||
inline wxPoint GetPosition() const override
|
||||
{
|
||||
return wxPoint( m_position.x, m_position.y );
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ void BOARD::ClearProject()
|
|||
}
|
||||
|
||||
|
||||
const wxPoint BOARD::GetPosition() const
|
||||
wxPoint BOARD::GetPosition() const
|
||||
{
|
||||
return ZeroOffset;
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ public:
|
|||
BOARD();
|
||||
~BOARD();
|
||||
|
||||
const wxPoint GetPosition() const override;
|
||||
wxPoint GetPosition() const override;
|
||||
void SetPosition( const wxPoint& aPos ) override;
|
||||
|
||||
bool IsEmpty() const
|
||||
|
|
|
@ -61,7 +61,7 @@ void DIMENSION::SetPosition( const wxPoint& aPos )
|
|||
}
|
||||
|
||||
|
||||
const wxPoint DIMENSION::GetPosition() const
|
||||
wxPoint DIMENSION::GetPosition() const
|
||||
{
|
||||
return m_Text.GetTextPos();
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
|
||||
int GetValue() const { return m_Value; }
|
||||
|
||||
const wxPoint GetPosition() const override;
|
||||
wxPoint GetPosition() const override;
|
||||
|
||||
void SetPosition( const wxPoint& aPos ) override;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ void DRAWSEGMENT::SetPosition( const wxPoint& aPos )
|
|||
}
|
||||
|
||||
|
||||
const wxPoint DRAWSEGMENT::GetPosition() const
|
||||
wxPoint DRAWSEGMENT::GetPosition() const
|
||||
{
|
||||
if( m_Shape == S_POLYGON )
|
||||
return (wxPoint) m_Poly.CVertex( 0 );
|
||||
|
@ -302,7 +302,7 @@ void DRAWSEGMENT::RebuildBezierToSegmentsPointsList( int aMinSegLen )
|
|||
}
|
||||
|
||||
|
||||
const wxPoint DRAWSEGMENT::GetCenter() const
|
||||
wxPoint DRAWSEGMENT::GetCenter() const
|
||||
{
|
||||
wxPoint c;
|
||||
|
||||
|
@ -333,7 +333,7 @@ const wxPoint DRAWSEGMENT::GetCenter() const
|
|||
}
|
||||
|
||||
|
||||
const wxPoint DRAWSEGMENT::GetArcEnd() const
|
||||
wxPoint DRAWSEGMENT::GetArcEnd() const
|
||||
{
|
||||
wxPoint endPoint( m_End ); // start of arc
|
||||
|
||||
|
@ -355,7 +355,7 @@ const wxPoint DRAWSEGMENT::GetArcEnd() const
|
|||
}
|
||||
|
||||
|
||||
const wxPoint DRAWSEGMENT::GetArcMid() const
|
||||
wxPoint DRAWSEGMENT::GetArcMid() const
|
||||
{
|
||||
wxPoint endPoint( m_End );
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
const wxPoint& GetBezControl2() const { return m_BezierC2; }
|
||||
|
||||
void SetPosition( const wxPoint& aPos ) override;
|
||||
const wxPoint GetPosition() const override;
|
||||
wxPoint GetPosition() const override;
|
||||
|
||||
/**
|
||||
* Function GetStart
|
||||
|
@ -150,7 +150,6 @@ public:
|
|||
const wxPoint& GetArcStart() const { return m_End; }
|
||||
const wxPoint GetArcEnd() const;
|
||||
const wxPoint GetArcMid() const;
|
||||
void GetRectCorners( std::vector<wxPoint>* pts ) const;
|
||||
|
||||
/**
|
||||
* function GetArcAngleStart()
|
||||
|
@ -182,11 +181,6 @@ public:
|
|||
*/
|
||||
void SetCenter( const wxPoint& aCenterPoint ) { m_Start = aCenterPoint; }
|
||||
|
||||
const wxPoint GetFocusPosition() const override
|
||||
{
|
||||
return GetCenter();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetParentModule
|
||||
* returns a pointer to the parent module, or NULL if DRAWSEGMENT does not
|
||||
|
|
|
@ -207,7 +207,7 @@ bool EDGE_MODULE::IsParentFlipped() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void EDGE_MODULE::Mirror( wxPoint aCentre, bool aMirrorAroundXAxis )
|
||||
void EDGE_MODULE::Mirror( const wxPoint& aCentre, bool aMirrorAroundXAxis )
|
||||
{
|
||||
// Mirror an edge of the footprint. the layer is not modified
|
||||
// This is a footprint shape modification.
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
* This is a footprint shape modification.
|
||||
* (should be only called by a footprint editing function)
|
||||
*/
|
||||
void Mirror( const wxPoint aCentre, bool aMirrorAroundXAxis );
|
||||
void Mirror( const wxPoint& aCentre, bool aMirrorAroundXAxis );
|
||||
|
||||
/**
|
||||
* Rotate an edge of the footprint.
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override;
|
||||
|
||||
const wxPoint GetPosition() const override { return m_Pos; }
|
||||
wxPoint GetPosition() const override { return m_Pos; }
|
||||
void SetPosition( const wxPoint& aPos ) override { m_Pos = aPos; }
|
||||
|
||||
bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override
|
||||
|
|
|
@ -203,7 +203,7 @@ public:
|
|||
|
||||
void SetPosition( const wxPoint& aPos ) override;
|
||||
|
||||
const wxPoint GetPosition() const override { return m_Pos; }
|
||||
wxPoint GetPosition() const override { return m_Pos; }
|
||||
|
||||
void SetOrientation( double newangle );
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
}
|
||||
|
||||
void SetPosition( const wxPoint& aPos ) override { m_Pos = aPos; }
|
||||
const wxPoint GetPosition() const override { return m_Pos; }
|
||||
wxPoint GetPosition() const override { return m_Pos; }
|
||||
|
||||
void SetShape( int aShape ) { m_Shape = aShape; }
|
||||
int GetShape() const { return m_Shape; }
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
return BOARD_ITEM::Matches( GetShownText(), aSearchData );
|
||||
}
|
||||
|
||||
virtual const wxPoint GetPosition() const override
|
||||
virtual wxPoint GetPosition() const override
|
||||
{
|
||||
return EDA_TEXT::GetTextPos();
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
return BOARD_ITEM::Matches( GetShownText(), aSearchData );
|
||||
}
|
||||
|
||||
virtual const wxPoint GetPosition() const override
|
||||
virtual wxPoint GetPosition() const override
|
||||
{
|
||||
return EDA_TEXT::GetTextPos();
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override;
|
||||
|
||||
void SetPosition( const wxPoint& aPos ) override { m_Start = aPos; }
|
||||
const wxPoint GetPosition() const override { return m_Start; }
|
||||
wxPoint GetPosition() const override { return m_Start; }
|
||||
const wxPoint GetFocusPosition() const override { return ( m_Start + m_End ) / 2; }
|
||||
|
||||
void SetWidth( int aWidth ) { m_Width = aWidth; }
|
||||
|
|
|
@ -227,7 +227,7 @@ bool ZONE_CONTAINER::UnFill()
|
|||
}
|
||||
|
||||
|
||||
const wxPoint ZONE_CONTAINER::GetPosition() const
|
||||
wxPoint ZONE_CONTAINER::GetPosition() const
|
||||
{
|
||||
return (wxPoint) GetCornerPosition( 0 );
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
/**
|
||||
* @return a wxPoint, position of the first point of the outline
|
||||
*/
|
||||
const wxPoint GetPosition() const override;
|
||||
wxPoint GetPosition() const override;
|
||||
void SetPosition( const wxPoint& aPos ) override {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
* Return the plot offset (usually the position
|
||||
* of the auxiliary axis
|
||||
*/
|
||||
const wxPoint GetOffset() { return m_offset; }
|
||||
wxPoint GetOffset() { return m_offset; }
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -179,7 +179,7 @@ public:
|
|||
* Return the plot offset (usually the position
|
||||
* of the auxiliary axis
|
||||
*/
|
||||
const wxPoint GetOffset() { return m_offset; }
|
||||
wxPoint GetOffset() { return m_offset; }
|
||||
|
||||
/**
|
||||
* Sets the page info used to plot drill maps
|
||||
|
|
|
@ -103,7 +103,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
const wxPoint GetPosition() const override
|
||||
wxPoint GetPosition() const override
|
||||
{
|
||||
static wxPoint dummy(0, 0);
|
||||
return dummy;
|
||||
|
|
Loading…
Reference in New Issue