Improve EDA_ITEM memory layout slightly.

This commit is contained in:
Alex Shvartzkop 2024-06-20 15:33:56 +03:00
parent c40708c051
commit 386651153b
2 changed files with 14 additions and 14 deletions

View File

@ -35,27 +35,27 @@
#include <eda_pattern_match.h> #include <eda_pattern_match.h>
EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ) : EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ) :
m_parent( parent ), m_structType( idType ),
m_forceVisible( false ),
m_flags( 0 ), m_flags( 0 ),
m_structType( idType ) m_parent( parent ),
m_forceVisible( false )
{ } { }
EDA_ITEM::EDA_ITEM( KICAD_T idType ) : EDA_ITEM::EDA_ITEM( KICAD_T idType ) :
m_structType( idType ),
m_flags( 0 ),
m_parent( nullptr ), m_parent( nullptr ),
m_forceVisible( false ), m_forceVisible( false ),
m_flags( 0 ),
m_structType( idType )
{ } { }
EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) : EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) :
m_Uuid( base.m_Uuid ), m_Uuid( base.m_Uuid ),
m_parent( base.m_parent ), m_structType( base.m_structType ),
m_forceVisible( base.m_forceVisible ),
m_flags( base.m_flags ), m_flags( base.m_flags ),
m_structType( base.m_structType ) m_parent( base.m_parent ),
m_forceVisible( base.m_forceVisible )
{ {
SetForcedTransparency( base.GetForcedTransparency() ); SetForcedTransparency( base.GetForcedTransparency() );
} }

View File

@ -484,17 +484,17 @@ protected:
public: public:
const KIID m_Uuid; const KIID m_Uuid;
protected:
EDA_ITEM* m_parent; ///< Linked list: Link (parent struct)
bool m_forceVisible;
EDA_ITEM_FLAGS m_flags;
private: private:
/** /**
* Run time identification, _keep private_ so it can never be changed after a ctor * Run time identification, _keep private_ so it can never be changed after a ctor
* sets it. See comment near SetType() regarding virtual functions. * sets it. See comment near SetType() regarding virtual functions.
*/ */
KICAD_T m_structType; KICAD_T m_structType;
protected:
EDA_ITEM_FLAGS m_flags;
EDA_ITEM* m_parent; ///< Linked list: Link (parent struct)
bool m_forceVisible;
}; };