diff --git a/eeschema/lib_item.cpp b/eeschema/lib_item.cpp index 7671012970..15f950fd8e 100644 --- a/eeschema/lib_item.cpp +++ b/eeschema/lib_item.cpp @@ -29,7 +29,7 @@ #include #include -const int FILL_TYPEab[3] = { 'N', 'F', 'f' }; +const int fill_tab[3] = { 'N', 'F', 'f' }; LIB_ITEM::LIB_ITEM( KICAD_T aType, diff --git a/eeschema/lib_item.h b/eeschema/lib_item.h index 8331b22cb2..38ffdae449 100644 --- a/eeschema/lib_item.h +++ b/eeschema/lib_item.h @@ -42,7 +42,7 @@ class MSG_PANEL_ITEM; using KIGFX::RENDER_SETTINGS; -extern const int FILL_TYPEab[]; +extern const int fill_tab[]; #define MINIMUM_SELECTION_DISTANCE 2 // Minimum selection distance in internal units diff --git a/eeschema/lib_rectangle.cpp b/eeschema/lib_rectangle.cpp index 5661905d0a..952af6cb3e 100644 --- a/eeschema/lib_rectangle.cpp +++ b/eeschema/lib_rectangle.cpp @@ -35,12 +35,11 @@ #include -LIB_RECTANGLE::LIB_RECTANGLE( LIB_PART* aParent ) : - LIB_ITEM( LIB_RECTANGLE_T, aParent ) +LIB_RECTANGLE::LIB_RECTANGLE( LIB_PART* aParent ) : LIB_ITEM( LIB_RECTANGLE_T, aParent ) { - m_Width = 0; + m_Width = 0; m_Fill = FILL_TYPE::NO_FILL; - m_isFillable = true; + m_isFillable = true; } diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp b/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp index 5d030d5112..25a9e1f3d4 100644 --- a/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp +++ b/eeschema/sch_plugins/kicad/sch_sexpr_parser.cpp @@ -513,17 +513,10 @@ void SCH_SEXPR_PARSER::parseFill( FILL_PARAMS& aFill ) switch( token ) { - case T_none: - aFill.m_FillType = FILL_TYPE::NO_FILL; - break; - case T_outline: - aFill.m_FillType = FILL_TYPE::FILLED_SHAPE; - break; - case T_background: - aFill.m_FillType = FILL_TYPE::FILLED_WITH_BG_BODYCOLOR; - break; - default: - Expecting( "none, outline, or background" ); + case T_none: aFill.m_FillType = FILL_TYPE::NO_FILL; break; + case T_outline: aFill.m_FillType = FILL_TYPE::FILLED_SHAPE; break; + case T_background: aFill.m_FillType = FILL_TYPE::FILLED_WITH_BG_BODYCOLOR; break; + default: Expecting( "none, outline, or background" ); } NeedRIGHT(); diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp index 9f0f066984..9dcf3256a5 100644 --- a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp +++ b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp @@ -82,16 +82,10 @@ static void formatFill( const LIB_ITEM* aItem, OUTPUTFORMATTER& aFormatter, int switch( aItem->GetFillMode() ) { - case FILL_TYPE::FILLED_SHAPE: - fillType = "outline"; - break; - case FILL_TYPE::FILLED_WITH_BG_BODYCOLOR: - fillType = "background"; - break; - case FILL_TYPE::NO_FILL: - KI_FALLTHROUGH; - default: - fillType = "none"; + case FILL_TYPE::FILLED_SHAPE: fillType = "outline"; break; + case FILL_TYPE::FILLED_WITH_BG_BODYCOLOR: fillType = "background"; break; + case FILL_TYPE::NO_FILL: KI_FALLTHROUGH; + default: fillType = "none"; } aFormatter.Print( aNestLevel, "(fill (type %s))", fillType ); diff --git a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp index e098d65cb7..5b81c41236 100644 --- a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp +++ b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp @@ -3207,14 +3207,10 @@ FILL_TYPE SCH_LEGACY_PLUGIN_CACHE::parseFillMode( LINE_READER& aReader, const ch { switch ( parseChar( aReader, aLine, aOutput ) ) { - case 'F': - return FILL_TYPE::FILLED_SHAPE; - case 'f': - return FILL_TYPE::FILLED_WITH_BG_BODYCOLOR; - case 'N': - return FILL_TYPE::NO_FILL; - default: - SCH_PARSE_ERROR( "invalid fill type, expected f, F, or N", aReader, aLine ); + case 'F': return FILL_TYPE::FILLED_SHAPE; + case 'f': return FILL_TYPE::FILLED_WITH_BG_BODYCOLOR; + case 'N': return FILL_TYPE::NO_FILL; + default: SCH_PARSE_ERROR( "invalid fill type, expected f, F, or N", aReader, aLine ); } // This will never be reached but quiets the compiler warnings @@ -3944,7 +3940,7 @@ void SCH_LEGACY_PLUGIN_CACHE::saveArc( LIB_ARC* aArc, aFormatter.Print( 0, "A %d %d %d %d %d %d %d %d %c %d %d %d %d\n", Iu2Mils( aArc->GetPosition().x ), Iu2Mils( aArc->GetPosition().y ), Iu2Mils( aArc->GetRadius() ), x1, x2, aArc->GetUnit(), aArc->GetConvert(), - Iu2Mils( aArc->GetWidth() ), FILL_TYPEab[ static_cast( aArc->GetFillMode() ) ], + Iu2Mils( aArc->GetWidth() ), fill_tab[ static_cast( aArc->GetFillMode() ) ], Iu2Mils( aArc->GetStart().x ), Iu2Mils( aArc->GetStart().y ), Iu2Mils( aArc->GetEnd().x ), Iu2Mils( aArc->GetEnd().y ) ); } @@ -3961,7 +3957,7 @@ void SCH_LEGACY_PLUGIN_CACHE::saveBezier( LIB_BEZIER* aBezier, for( const auto& pt : aBezier->GetPoints() ) aFormatter.Print( 0, " %d %d", Iu2Mils( pt.x ), Iu2Mils( pt.y ) ); - aFormatter.Print( 0, " %c\n", FILL_TYPEab[static_cast( aBezier->GetFillMode() )] ); + aFormatter.Print( 0, " %c\n", fill_tab[static_cast( aBezier->GetFillMode() )] ); } @@ -3973,7 +3969,7 @@ void SCH_LEGACY_PLUGIN_CACHE::saveCircle( LIB_CIRCLE* aCircle, aFormatter.Print( 0, "C %d %d %d %d %d %d %c\n", Iu2Mils( aCircle->GetPosition().x ), Iu2Mils( aCircle->GetPosition().y ), Iu2Mils( aCircle->GetRadius() ), aCircle->GetUnit(), aCircle->GetConvert(), - Iu2Mils( aCircle->GetWidth() ), FILL_TYPEab[static_cast( aCircle->GetFillMode() )] ); + Iu2Mils( aCircle->GetWidth() ), fill_tab[static_cast( aCircle->GetFillMode() )] ); } @@ -4160,7 +4156,7 @@ void SCH_LEGACY_PLUGIN_CACHE::savePolyLine( LIB_POLYLINE* aPolyLine, aFormatter.Print( 0, " %d %d", Iu2Mils( pt.x ), Iu2Mils( pt.y ) ); } - aFormatter.Print( 0, " %c\n", FILL_TYPEab[static_cast( aPolyLine->GetFillMode() )] ); + aFormatter.Print( 0, " %c\n", fill_tab[static_cast( aPolyLine->GetFillMode() )] ); } @@ -4175,7 +4171,7 @@ void SCH_LEGACY_PLUGIN_CACHE::saveRectangle( LIB_RECTANGLE* aRectangle, Iu2Mils( aRectangle->GetPosition().y ), Iu2Mils( aRectangle->GetEnd().x ), Iu2Mils( aRectangle->GetEnd().y ), aRectangle->GetUnit(), aRectangle->GetConvert(), - Iu2Mils( aRectangle->GetWidth() ), FILL_TYPEab[static_cast( aRectangle->GetFillMode() )] ); + Iu2Mils( aRectangle->GetWidth() ), fill_tab[static_cast( aRectangle->GetFillMode() )] ); } diff --git a/eeschema/tools/lib_drawing_tools.h b/eeschema/tools/lib_drawing_tools.h index 4384a38cf2..bd04f96509 100644 --- a/eeschema/tools/lib_drawing_tools.h +++ b/eeschema/tools/lib_drawing_tools.h @@ -68,10 +68,10 @@ private: void setTransitions() override; private: - double m_lastTextAngle; + double m_lastTextAngle; FILL_TYPE m_lastFillStyle; - bool m_drawSpecificConvert; - bool m_drawSpecificUnit; + bool m_drawSpecificConvert; + bool m_drawSpecificUnit; }; #endif /* LIB_DRAWING_TOOLS_H */ diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp index 34c139f65e..c9401a57bb 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_loader.cpp @@ -1193,7 +1193,7 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadTemplates() zone->SetLocalClearance( getKiCadLength( csTemplate.Pouring.AdditionalIsolation ) ); - if( csTemplate.Pouring.FillType == TEMPLATE::POURING::COPPER_FILL_TYPEYPE::HATCHED ) + if( csTemplate.Pouring.FillType == TEMPLATE::POURING::COPPER_FILL_TYPE::HATCHED ) { zone->SetFillMode( ZONE_FILL_MODE::HATCH_PATTERN ); zone->SetHatchGap( getKiCadHatchCodeGap( csTemplate.Pouring.HatchCodeID ) ); diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp index 2bbd502756..74d041d658 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.cpp @@ -1396,7 +1396,7 @@ void CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::Parse( XNODE* aNode ) LayerID = GetXmlAttributeIDString( aNode, 1 ); wxString subTypeStr = GetXmlAttributeIDString( aNode, 2 ); - std::map subTypeMap = { + std::map subTypeMap = { { wxT( "DIMENSION_ORTHOGONAL" ), SUBTYPE::ORTHOGONAL }, { wxT( "DIMENSION_DIRECT" ), SUBTYPE::DIRECT }, { wxT( "DIMENSION_ANGLED" ), SUBTYPE::ANGLED }, @@ -2143,11 +2143,11 @@ void CADSTAR_PCB_ARCHIVE_PARSER::TEMPLATE::POURING::Parse( XNODE* aNode ) } else if( cNodeName == wxT( "FILLED" ) ) { - FillType = COPPER_FILL_TYPEYPE::FILLED; + FillType = COPPER_FILL_TYPE::FILLED; } else if( cNodeName == wxT( "HATCHCODEREF" ) ) { - FillType = COPPER_FILL_TYPEYPE::HATCHED; + FillType = COPPER_FILL_TYPE::HATCHED; HatchCodeID = GetXmlAttributeIDString( cNode, 0 ); } else diff --git a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h index a16067277a..c0da578f67 100644 --- a/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h +++ b/pcbnew/plugins/cadstar/cadstar_pcb_archive_parser.h @@ -1005,7 +1005,7 @@ public: { struct POURING { - enum class COPPER_FILL_TYPEYPE + enum class COPPER_FILL_TYPE { FILLED, HATCHED ///< This is a user defined HATCHCODE_ID @@ -1062,7 +1062,7 @@ public: bool TargetForAutorouting = false; ///< true when subnode "AUTOROUTETARGET" is present RELIEF_TYPE ReliefType = RELIEF_TYPE::CROSS; ///< See RELIEF_TYPE - COPPER_FILL_TYPEYPE FillType = COPPER_FILL_TYPEYPE::FILLED; ///< Assume solid fill + COPPER_FILL_TYPE FillType = COPPER_FILL_TYPE::FILLED; ///< Assume solid fill HATCHCODE_ID HatchCodeID = wxEmptyString; ///< Only for FillType = HATCHED void Parse( XNODE* aNode );