Commit 058e17ed authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

Minor code and Doxygen comment improvements.

* Remove double Clone() function calls from all classes derived from
  EDA_ITEM.
* Lots of Doxygen comment warning fixes.
parent ffbbd64c
Loading
Loading
Loading
Loading
+5 −12
Original line number Original line Diff line number Diff line
@@ -99,17 +99,10 @@ void EDA_ITEM::SetModified()
}
}




EDA_ITEM* EDA_ITEM::doClone() const
{
    wxCHECK_MSG( false, NULL, wxT( "doClone not implemented in derived class " ) + GetClass() +
                 wxT( ".  Bad programmer." ) );
}


EDA_ITEM* EDA_ITEM::Clone() const
EDA_ITEM* EDA_ITEM::Clone() const
{
{
    // save about 6 bytes per call by hiding the virtual function in this non-inline function.
    wxCHECK_MSG( false, NULL, wxT( "Clone not implemented in derived class " ) + GetClass() +
    return doClone();
                 wxT( ".  Bad programmer!" ) );
}
}




@@ -272,9 +265,9 @@ std::ostream& EDA_ITEM::NestedSpace( int nestLevel, std::ostream& os )
#endif
#endif




/**************************************************/
/*******************************************/
/* EDA_TEXT (basic class, not directly used */
/* EDA_TEXT (base class, not directly used */
/**************************************************/
/*******************************************/
EDA_TEXT::EDA_TEXT( const wxString& text )
EDA_TEXT::EDA_TEXT( const wxString& text )
{
{
    m_Size.x    = m_Size.y = DEFAULT_SIZE_TEXT;  // Width and height of font.
    m_Size.x    = m_Size.y = DEFAULT_SIZE_TEXT;  // Width and height of font.
+1 −1
Original line number Original line Diff line number Diff line
@@ -476,7 +476,7 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
    if( m_itemToRepeat == NULL )
    if( m_itemToRepeat == NULL )
        return;
        return;


    m_itemToRepeat = m_itemToRepeat->Clone();
    m_itemToRepeat = (SCH_ITEM*) m_itemToRepeat->Clone();


    if( m_itemToRepeat->Type() == SCH_COMPONENT_T ) // If repeat component then put in move mode
    if( m_itemToRepeat->Type() == SCH_COMPONENT_T ) // If repeat component then put in move mode
    {
    {
+1 −1
Original line number Original line Diff line number Diff line
@@ -221,7 +221,7 @@ bool LIB_ARC::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTran
}
}




EDA_ITEM* LIB_ARC::doClone() const
EDA_ITEM* LIB_ARC::Clone() const
{
{
    return new LIB_ARC( *this );
    return new LIB_ARC( *this );
}
}
+4 −7
Original line number Original line Diff line number Diff line
@@ -106,12 +106,7 @@ public:


    virtual bool Load( LINE_READER& aLineReader, wxString& aErrorMsg );
    virtual bool Load( LINE_READER& aLineReader, wxString& aErrorMsg );


    /**
    /** @copydoc EDA_ITEM::HitTest(const wxPoint&) */
     * Tests if the given wxPoint is within the bounds of this object.
     *
     * @param aPosition - Coordinates to test
     * @return - True if a hit, else false
     */
    virtual bool HitTest( const wxPoint& aPosition );
    virtual bool HitTest( const wxPoint& aPosition );


     /**
     /**
@@ -204,8 +199,10 @@ public:
    /** @copydoc EDA_ITEM::GetMenuImage() */
    /** @copydoc EDA_ITEM::GetMenuImage() */
    virtual BITMAP_DEF GetMenuImage() const { return  add_arc_xpm; }
    virtual BITMAP_DEF GetMenuImage() const { return  add_arc_xpm; }


    /** @copydoc EDA_ITEM::Clone() */
    virtual EDA_ITEM* Clone() const;

private:
private:
    virtual EDA_ITEM* doClone() const;


    /**
    /**
     * Function compare
     * Function compare
+1 −1
Original line number Original line Diff line number Diff line
@@ -132,7 +132,7 @@ bool LIB_BEZIER::Load( LINE_READER& aLineReader, wxString& aErrorMsg )
}
}




EDA_ITEM* LIB_BEZIER::doClone() const
EDA_ITEM* LIB_BEZIER::Clone() const
{
{
    return new LIB_BEZIER( *this );
    return new LIB_BEZIER( *this );
}
}
Loading