Formatting.

This commit is contained in:
Jeff Young 2024-05-25 22:03:59 +01:00
parent 34dbee0693
commit b0dddb6d95
3 changed files with 256 additions and 255 deletions

View File

@ -1304,7 +1304,8 @@ void PCB_EDIT_FRAME::GenIPC2581File( wxCommandEvent& event )
props["dist"] = dlg.GetDist(); props["dist"] = dlg.GetDist();
props["distpn"] = dlg.GetDistPN(); props["distpn"] = dlg.GetDistPN();
auto saveFile = [&]() -> bool auto saveFile =
[&]() -> bool
{ {
try try
{ {

View File

@ -619,7 +619,8 @@ void PCB_IO_IPC2581::addText( wxXmlNode* aContentNode, EDA_TEXT* aText,
std::list<VECTOR2I> pts; std::list<VECTOR2I> pts;
auto push_pts = [&]() auto push_pts =
[&]()
{ {
if( pts.size() < 2 ) if( pts.size() < 2 )
return; return;
@ -2035,7 +2036,8 @@ wxXmlNode* PCB_IO_IPC2581::addPackage( wxXmlNode* aContentNode, FOOTPRINT* aFp )
elements[item->GetLayer()][is_abs].push_back( item ); elements[item->GetLayer()][is_abs].push_back( item );
} }
auto add_base_node = [&]( PCB_LAYER_ID aLayer ) -> wxXmlNode* auto add_base_node =
[&]( PCB_LAYER_ID aLayer ) -> wxXmlNode*
{ {
wxXmlNode* parent = packageNode; wxXmlNode* parent = packageNode;
bool is_back = aLayer == B_SilkS || aLayer == B_Fab; bool is_back = aLayer == B_SilkS || aLayer == B_Fab;
@ -2061,7 +2063,8 @@ wxXmlNode* PCB_IO_IPC2581::addPackage( wxXmlNode* aContentNode, FOOTPRINT* aFp )
return new_node; return new_node;
}; };
auto add_marking_node = [&]( wxXmlNode* aNode ) -> wxXmlNode* auto add_marking_node =
[&]( wxXmlNode* aNode ) -> wxXmlNode*
{ {
wxXmlNode* marking_node = appendNode( aNode, "Marking" ); wxXmlNode* marking_node = appendNode( aNode, "Marking" );
addAttribute( marking_node, "markingUsage", "NONE" ); addAttribute( marking_node, "markingUsage", "NONE" );
@ -2554,7 +2557,8 @@ void PCB_IO_IPC2581::generateLayerSetNet( wxXmlNode* aLayerNode, PCB_LAYER_ID aL
addAttribute( layerSetNode, "net", genString( item->GetNetname(), "NET" ) ); addAttribute( layerSetNode, "net", genString( item->GetNetname(), "NET" ) );
} }
auto add_track = [&]( PCB_TRACK* track ) auto add_track =
[&]( PCB_TRACK* track )
{ {
if( track->Type() == PCB_TRACE_T ) if( track->Type() == PCB_TRACE_T )
{ {
@ -2596,7 +2600,8 @@ void PCB_IO_IPC2581::generateLayerSetNet( wxXmlNode* aLayerNode, PCB_LAYER_ID aL
} }
}; };
auto add_zone = [&]( ZONE* zone ) auto add_zone =
[&]( ZONE* zone )
{ {
wxXmlNode* zoneFeatureNode = specialNode; wxXmlNode* zoneFeatureNode = specialNode;
@ -2637,7 +2642,8 @@ void PCB_IO_IPC2581::generateLayerSetNet( wxXmlNode* aLayerNode, PCB_LAYER_ID aL
addContourNode( zoneFeatureNode, zone_shape, ii ); addContourNode( zoneFeatureNode, zone_shape, ii );
}; };
auto add_shape = [&] ( PCB_SHAPE* shape ) auto add_shape =
[&] ( PCB_SHAPE* shape )
{ {
FOOTPRINT* fp = shape->GetParentFootprint(); FOOTPRINT* fp = shape->GetParentFootprint();
@ -2673,7 +2679,8 @@ void PCB_IO_IPC2581::generateLayerSetNet( wxXmlNode* aLayerNode, PCB_LAYER_ID aL
} }
}; };
auto add_text = [&] ( BOARD_ITEM* text ) auto add_text =
[&] ( BOARD_ITEM* text )
{ {
EDA_TEXT* text_item; EDA_TEXT* text_item;
FOOTPRINT* fp = text->GetParentFootprint(); FOOTPRINT* fp = text->GetParentFootprint();
@ -2712,7 +2719,8 @@ void PCB_IO_IPC2581::generateLayerSetNet( wxXmlNode* aLayerNode, PCB_LAYER_ID aL
} }
}; };
auto add_pad = [&]( PAD* pad ) auto add_pad =
[&]( PAD* pad )
{ {
if( !padSetNode ) if( !padSetNode )
{ {

View File

@ -49,10 +49,6 @@ class SHAPE_SEGMENT;
class PCB_IO_IPC2581 : public PCB_IO class PCB_IO_IPC2581 : public PCB_IO
{ {
public: public:
/**
* @brief PCB_IO_IPC2581
*
*/
PCB_IO_IPC2581() : PCB_IO( wxS( "IPC-2581" ) ) PCB_IO_IPC2581() : PCB_IO( wxS( "IPC-2581" ) )
{ {
m_total_bytes = 0; m_total_bytes = 0;
@ -73,11 +69,9 @@ public:
~PCB_IO_IPC2581() override; ~PCB_IO_IPC2581() override;
/**
*
*/
// BOARD* LoadBoard( const wxString& aFileName, BOARD* aAppendToMe, // BOARD* LoadBoard( const wxString& aFileName, BOARD* aAppendToMe,
// const STRING_UTF8_MAP* aProperties = nullptr, PROJECT* aProject = nullptr ) override; // const STRING_UTF8_MAP* aProperties = nullptr,
// PROJECT* aProject = nullptr ) override;
void SaveBoard( const wxString& aFileName, BOARD* aBoard, void SaveBoard( const wxString& aFileName, BOARD* aBoard,
const STRING_UTF8_MAP* aProperties = nullptr ) override; const STRING_UTF8_MAP* aProperties = nullptr ) override;
@ -123,13 +117,11 @@ private:
/** /**
* Frees the memory allocated for the loaded footprints in #m_loaded_footprints. * Frees the memory allocated for the loaded footprints in #m_loaded_footprints.
*
*/ */
void clearLoadedFootprints(); void clearLoadedFootprints();
/** /**
* Creates the XML header for IPC-2581 * Creates the XML header for IPC-2581
*
*/ */
wxXmlNode* generateXmlHeader(); wxXmlNode* generateXmlHeader();