From 310d26620e27ec4cb7ba16f5fbd05ec2c67eb21c Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Mon, 3 Apr 2023 12:27:28 -0400 Subject: [PATCH] Symbol Fields Table: more MSVC build fixes --- eeschema/fields_data_model.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/eeschema/fields_data_model.cpp b/eeschema/fields_data_model.cpp index e033260299..0251a644d8 100644 --- a/eeschema/fields_data_model.cpp +++ b/eeschema/fields_data_model.cpp @@ -16,10 +16,7 @@ void FIELDS_EDITOR_GRID_DATA_MODEL::AddColumn( const wxString& aFieldName, const if( GetFieldNameCol( aFieldName ) != -1 ) return; - m_cols.push_back((struct DATA_MODEL_COL) { - .m_fieldName = aFieldName, - .m_label = aLabel, - .m_userAdded = aAddedByUser }); + m_cols.push_back( ( struct DATA_MODEL_COL ){ aFieldName, aLabel, aAddedByUser, false, false } ); for( unsigned i = 0; i < m_symbolsList.GetCount(); ++i ) { @@ -83,10 +80,8 @@ const std::vector FIELDS_EDITOR_GRID_DATA_MODEL::GetFieldsOrdered() std::vector fields; for( auto col : m_cols ) - fields.emplace_back( ( struct BOM_FIELD ){ .name = col.m_fieldName, - .label = col.m_label, - .show = col.m_show, - .groupBy = col.m_group } ); + fields.emplace_back( + ( struct BOM_FIELD ){ col.m_fieldName, col.m_label, col.m_show, col.m_group } ); return fields; } @@ -696,7 +691,7 @@ wxString FIELDS_EDITOR_GRID_DATA_MODEL::Export( const BOM_FMT_PRESET& settings ) settings.stringDelimiter + settings.stringDelimiter ); return settings.stringDelimiter + field + settings.stringDelimiter - + ( last ? wxS( "\r\n" ) : settings.fieldDelimiter ); + + wxString( last ? wxS( "\r\n" ) : settings.fieldDelimiter ); }; // Column names