diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index 56c17fac04..9162f36706 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -552,7 +552,7 @@ void EDA_3D_CANVAS::Draw3D_DrawSegment( DRAWSEGMENT* segment ) break; case S_CIRCLE: - { + { int radius = KiROUND( hypot( double(segment->GetStart().x - segment->GetEnd().x), double(segment->GetStart().y - segment->GetEnd().y) ) ); @@ -998,12 +998,11 @@ void D_PAD::Draw3D( EDA_3D_CANVAS* glcanvas ) polyPadShape.insert( polyPadShape.end(), holecornersBuffer.begin(), holecornersBuffer.end() ); } - break; case PAD_RECT: case PAD_TRAPEZOID: - { + { wxPoint coord[5]; BuildPadPolygon( coord, wxSize(0,0), m_Orient ); for( int ii = 0; ii < 4; ii ++ ) @@ -1018,7 +1017,7 @@ void D_PAD::Draw3D( EDA_3D_CANVAS* glcanvas ) polyPadShape.insert( polyPadShape.end(), holecornersBuffer.begin(), holecornersBuffer.end() ); } - break; + break; default: break; diff --git a/3d-viewer/3d_draw_basic_functions.cpp b/3d-viewer/3d_draw_basic_functions.cpp index e8cd9a2b61..854866213f 100644 --- a/3d-viewer/3d_draw_basic_functions.cpp +++ b/3d-viewer/3d_draw_basic_functions.cpp @@ -124,7 +124,7 @@ static void Draw3D_VerticalPolygonalCylinder( const std::vector& aPolys void SetGLColor( EDA_COLOR_T color ) { - double red, green, blue; + double red, green, blue; const StructColors &colordata = g_ColorRefs[ColorGetBase( color )]; red = colordata.m_Red / 255.0; diff --git a/common/projet_config.cpp b/common/projet_config.cpp index 2a488b8aa0..901eb2b1fd 100644 --- a/common/projet_config.cpp +++ b/common/projet_config.cpp @@ -358,8 +358,8 @@ PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( const wxChar* ident, EDA_COLOR_T* ptpara PARAM_CFG_SETCOLOR::PARAM_CFG_SETCOLOR( bool Insetup, const wxChar* ident, - EDA_COLOR_T* ptparam, - EDA_COLOR_T default_val, + EDA_COLOR_T* ptparam, + EDA_COLOR_T default_val, const wxChar* group ) : PARAM_CFG_BASE( ident, PARAM_SETCOLOR, group ) { diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index a2440f0800..3419efcd9e 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -345,7 +345,7 @@ void SCH_EDIT_FRAME::DeleteCurrentSegment( wxDC* DC ) if( ( screen->GetCurItem() == NULL ) || !screen->GetCurItem()->IsNew() ) return; - DrawSegment( m_canvas, DC, wxDefaultPosition, false ); + DrawSegment( m_canvas, DC, wxDefaultPosition, false ); screen->Remove( screen->GetCurItem() ); m_canvas->SetMouseCaptureCallback( NULL ); diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 64cac94fb1..07c9b5aa8b 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -101,7 +101,7 @@ class HIERARCHY_NAVIG_DLG : public wxDialog { public: SCH_EDIT_FRAME* m_Parent; - HIERARCHY_TREE* m_Tree; + HIERARCHY_TREE* m_Tree; int m_nbsheets; wxDC* m_DC; diff --git a/eeschema/load_one_schematic_file.cpp b/eeschema/load_one_schematic_file.cpp index 7d7a9be5ad..6d0d5528c0 100644 --- a/eeschema/load_one_schematic_file.cpp +++ b/eeschema/load_one_schematic_file.cpp @@ -227,7 +227,7 @@ again." ); { // Load it if it wasn't by a factory if( !itemLoaded ) - itemLoaded = item->Load( reader, msgDiag ); + itemLoaded = item->Load( reader, msgDiag ); if( !itemLoaded ) { diff --git a/eeschema/netlist.h b/eeschema/netlist.h index e1c6ea3f10..55189e5df4 100644 --- a/eeschema/netlist.h +++ b/eeschema/netlist.h @@ -45,7 +45,7 @@ class SCH_REFERENC_LIST; #define NETLIST_HEAD_STRING "EESchema Netlist Version 1.1" -// Max pin number per component and footprint +// Max pin number per component and footprint #define MAXPIN 5000 diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp index 22b9cbde18..dfd9e54900 100644 --- a/eeschema/sch_bus_entry.cpp +++ b/eeschema/sch_bus_entry.cpp @@ -62,7 +62,7 @@ SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const wxPoint& pos, char shape ) : SCH_BUS_BUS_ENTRY::SCH_BUS_BUS_ENTRY( const wxPoint& pos, char shape ) : SCH_BUS_ENTRY_BASE( SCH_BUS_BUS_ENTRY_T, pos, shape ) { - m_Layer = LAYER_BUS; + m_Layer = LAYER_BUS; } EDA_ITEM* SCH_BUS_WIRE_ENTRY::Clone() const @@ -255,7 +255,7 @@ void SCH_BUS_ENTRY_BASE::GetConnectionPoints( vector< wxPoint >& aPoints ) const wxString SCH_BUS_WIRE_ENTRY::GetSelectMenuText() const { - return wxString( _( "Bus to Wire Entry" ) ); + return wxString( _( "Bus to Wire Entry" ) ); } diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index 304e5dadef..258c3f3385 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -965,10 +965,10 @@ bool SCH_SCREEN::BreakSegmentsOnJunctions() { SCH_BUS_ENTRY_BASE* busEntry = dynamic_cast( item ); if( busEntry ) - { - if( BreakSegment( busEntry->GetPosition() ) - || BreakSegment( busEntry->m_End() ) ) - brokenSegments = true; + { + if( BreakSegment( busEntry->GetPosition() ) + || BreakSegment( busEntry->m_End() ) ) + brokenSegments = true; } } } diff --git a/pcbnew/autorouter/graphpcb.cpp b/pcbnew/autorouter/graphpcb.cpp index d7182012d5..ad2f5496e6 100644 --- a/pcbnew/autorouter/graphpcb.cpp +++ b/pcbnew/autorouter/graphpcb.cpp @@ -71,14 +71,14 @@ static void TraceCircle( int ux0, int uy0, int ux1, int uy1, int lg, LAYER_NUM l if( layer == UNDEFINED_LAYER ) \ { \ RoutingMatrix.WriteCell( dy, dx, BOTTOM, color ); \ - if( RoutingMatrix.m_RoutingLayersCount > 1 ) \ - RoutingMatrix.WriteCell( dy, dx, TOP, color ); \ + if( RoutingMatrix.m_RoutingLayersCount > 1 ) \ + RoutingMatrix.WriteCell( dy, dx, TOP, color ); \ } \ else \ { \ if( layer == g_Route_Layer_BOTTOM ) \ RoutingMatrix.WriteCell( dy, dx, BOTTOM, color ); \ - if( RoutingMatrix.m_RoutingLayersCount > 1 ) \ + if( RoutingMatrix.m_RoutingLayersCount > 1 ) \ if( layer == g_Route_Layer_TOP ) \ RoutingMatrix.WriteCell( dy, dx, TOP, color ); \ } \ diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 326b78e06a..80e54e873c 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1206,7 +1206,7 @@ TRACK* TRACK::GetVia( const wxPoint& aPosition, LAYER_NUM aLayer) if( track->GetState( BUSY | IS_DELETED ) ) continue; - if( aLayer == UNDEFINED_LAYER ) + if( aLayer == UNDEFINED_LAYER ) break; if( track->IsOnLayer( aLayer ) ) diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index 9fb8bdb7f1..c00a59f4a9 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -280,7 +280,7 @@ void PCB_EDIT_FRAME::PrintPage( wxDC* aDC, ZONE_CONTAINER* zone = Pcb->GetArea( ii ); if( aPrintMaskLayer & GetLayerMask( zone->GetLayer() ) ) - zone->DrawFilledArea( m_canvas, aDC, drawmode ); + zone->DrawFilledArea( m_canvas, aDC, drawmode ); } // Draw footprints, this is done at last in order to print the pad holes in diff --git a/pcbnew/scripting/units.i b/pcbnew/scripting/units.i index 83764b3d0e..e76276b2cd 100644 --- a/pcbnew/scripting/units.i +++ b/pcbnew/scripting/units.i @@ -46,34 +46,34 @@ def ToMils(iu): if type(iu) in [int,float]: - return float(iu) / float(IU_PER_MILS) + return float(iu) / float(IU_PER_MILS) elif type(iu) in [wxPoint,wxSize]: - return tuple(map(ToMils,iu)) - + return tuple(map(ToMils,iu)) + def FromMils(mils): if type(mils) in [int,float]: return int(float(mils)*float(IU_PER_MILS)) elif type(mils) in [wxPoint,wxSize]: - return tuple(map(FromMils,mils)) - + return tuple(map(FromMils,mils)) + def wxSizeMM(mmx,mmy): return wxSize(FromMM(mmx),FromMM(mmy)) def wxSizeMils(mmx,mmy): return wxSize(FromMils(mmx),FromMils(mmy)) - + def wxPointMM(mmx,mmy): return wxPoint(FromMM(mmx),FromMM(mmy)) def wxPointMils(mmx,mmy): return wxPoint(FromMils(mmx),FromMils(mmy)) def wxRectMM(x,y,wx,wy): - x = int(FromMM(x)) - y = int(FromMM(y)) - wx = int(FromMM(wx)) - wy = int (FromMM(wy)) - return wxRect(x,y,wx,wy) + x = int(FromMM(x)) + y = int(FromMM(y)) + wx = int(FromMM(wx)) + wy = int (FromMM(wy)) + return wxRect(x,y,wx,wy) def wxRectMils(x,y,wx,wy): - x = int(FromMils(x)) - y = int(FromMils(y)) - wx = int(FromMils(wx)) - wy = int (FromMils(wy)) - return wxRect(x,y,wx,wy) + x = int(FromMils(x)) + y = int(FromMils(y)) + wx = int(FromMils(wx)) + wy = int (FromMils(wy)) + return wxRect(x,y,wx,wy) } diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index 0985c06a41..9b4b512266 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -68,7 +68,7 @@ END_EVENT_TABLE() LAYER_NUM PCB_BASE_FRAME::SelectLayer( LAYER_NUM default_layer, LAYER_NUM min_layer, LAYER_NUM max_layer, - bool null_layer ) + bool null_layer ) { SELECT_LAYER_DIALOG* frame = new SELECT_LAYER_DIALOG( this, default_layer, diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index 3df519dfea..82ad49f011 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -198,7 +198,7 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* DC, GR_DRAWMODE aDrawMode, const for( MODULE* module = m_Modules; module; module = module->Next() ) { - bool display = true; + bool display = true; LAYER_MSK layerMask = ALL_CU_LAYERS; if( module->IsMoving() )