7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-14 12:49:34 +00:00

Initialize m_orginal

This commit is contained in:
Seth Hillbrand 2025-02-24 15:11:05 -08:00
parent 7db3ccd98a
commit 141d50f0c1
2 changed files with 4 additions and 1 deletions

View File

@ -40,7 +40,8 @@ class TEMPLATE_FIELDNAMES_LEXER;
* NOTE: this must stay a enum class to prevent developers from trying to use it as an array
* index.
*/
enum class FIELD_T {
enum class FIELD_T : int
{
USER, ///< The field ID hasn't been set yet; field is invalid
REFERENCE, ///< Field Reference of part, i.e. "IC21"
VALUE, ///< Field Value of part, i.e. "3.3K"

View File

@ -34,6 +34,7 @@
PCB_FIELD::PCB_FIELD( FOOTPRINT* aParent, FIELD_T aFieldId, const wxString& aName ) :
PCB_TEXT( aParent, PCB_FIELD_T ),
m_id( aFieldId ),
m_ordinal( static_cast<int>( aFieldId ) ),
m_name( aName )
{
if( m_id == FIELD_T::USER )
@ -46,6 +47,7 @@ PCB_FIELD::PCB_FIELD( FOOTPRINT* aParent, FIELD_T aFieldId, const wxString& aNam
PCB_FIELD::PCB_FIELD( const PCB_TEXT& aText, FIELD_T aFieldId, const wxString& aName ) :
PCB_TEXT( aText ),
m_id( aFieldId ),
m_ordinal( static_cast<int>( aFieldId ) ),
m_name( aName )
{
}