Removed friendship in LIB_PART and LIB_ALIAS classes.
It is not required and may a source of unnecessary temptation. There is no place for friendship in rough C++ world.
This commit is contained in:
parent
aa81f5b98d
commit
2c20a10242
|
@ -89,8 +89,6 @@ class LIB_ALIAS : public EDA_ITEM
|
||||||
*/
|
*/
|
||||||
LIB_PART* shared;
|
LIB_PART* shared;
|
||||||
|
|
||||||
friend class LIB_PART;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxString name;
|
wxString name;
|
||||||
wxString description; ///< documentation for info
|
wxString description; ///< documentation for info
|
||||||
|
@ -226,10 +224,6 @@ struct PART_DRAW_OPTIONS
|
||||||
*/
|
*/
|
||||||
class LIB_PART : public EDA_ITEM
|
class LIB_PART : public EDA_ITEM
|
||||||
{
|
{
|
||||||
friend class PART_LIB;
|
|
||||||
friend class LIB_ALIAS;
|
|
||||||
friend class SCH_LEGACY_PLUGIN_CACHE;
|
|
||||||
|
|
||||||
PART_SPTR m_me; ///< http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/sp_techniques.html#weak_without_shared
|
PART_SPTR m_me; ///< http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/sp_techniques.html#weak_without_shared
|
||||||
LIB_ID m_libId;
|
LIB_ID m_libId;
|
||||||
int m_pinNameOffset; ///< The offset in mils to draw the pin name. Set to 0
|
int m_pinNameOffset; ///< The offset in mils to draw the pin name. Set to 0
|
||||||
|
|
|
@ -555,9 +555,9 @@ bool LIB_MANAGER::LIB_BUFFER::CreateBuffer( LIB_PART* aCopy, SCH_SCREEN* aScreen
|
||||||
|
|
||||||
// Set the parent library name,
|
// Set the parent library name,
|
||||||
// otherwise it is empty as no library has been given as the owner during object construction
|
// otherwise it is empty as no library has been given as the owner during object construction
|
||||||
LIB_ID libId = aCopy->GetLibId();
|
// TODO create a class derived from
|
||||||
|
LIB_ID& libId = (LIB_ID&) aCopy->GetLibId();
|
||||||
libId.SetLibNickname( m_libName );
|
libId.SetLibNickname( m_libName );
|
||||||
aCopy->SetLibId( libId );
|
|
||||||
++m_hash;
|
++m_hash;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue