diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/cobject2d.h b/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/cobject2d.h index d823eaf4a2..72a9376eff 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/cobject2d.h +++ b/3d-viewer/3d_rendering/3d_render_raytracing/shapes2D/cobject2d.h @@ -33,7 +33,7 @@ #include "cbbox2d.h" #include -#include +#include enum class INTERSECTION_RESULT { diff --git a/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cobject.h b/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cobject.h index afebe2cbb7..fbefa5b9b4 100644 --- a/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cobject.h +++ b/3d-viewer/3d_rendering/3d_render_raytracing/shapes3D/cobject.h @@ -34,7 +34,7 @@ #include "../hitinfo.h" #include "../cmaterial.h" -#include +#include enum class OBJECT3D_TYPE { diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 4e65ec822b..3b012d78ee 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -502,12 +502,12 @@ set( PCB_COMMON_SRCS ${CMAKE_SOURCE_DIR}/pcbnew/board_design_settings.cpp ${CMAKE_SOURCE_DIR}/pcbnew/board_items_to_polygon_shape_transform.cpp ${CMAKE_SOURCE_DIR}/pcbnew/board.cpp - ${CMAKE_SOURCE_DIR}/pcbnew/class_board_item.cpp + ${CMAKE_SOURCE_DIR}/pcbnew/board_item.cpp ${CMAKE_SOURCE_DIR}/pcbnew/dimension.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_shape.cpp ${CMAKE_SOURCE_DIR}/pcbnew/fp_shape.cpp ${CMAKE_SOURCE_DIR}/pcbnew/pcb_group.cpp - ${CMAKE_SOURCE_DIR}/pcbnew/class_marker_pcb.cpp + ${CMAKE_SOURCE_DIR}/pcbnew/pcb_marker.cpp ${CMAKE_SOURCE_DIR}/pcbnew/footprint.cpp ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp ${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index 3d821f7ae1..ef10db2e77 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -79,7 +79,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame m_gridSelectBox = NULL; m_zoomSelectBox = NULL; m_firstRunDialogSetting = 0; - m_UndoRedoCountMax = DEFAULT_MAX_UNDO_ITEMS; + m_undoRedoCountMax = DEFAULT_MAX_UNDO_ITEMS; m_canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE; m_canvas = NULL; @@ -92,9 +92,9 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame m_drawBgColor = COLOR4D( BLACK ); // the background color of the draw canvas: // BLACK for Pcbnew, BLACK or WHITE for Eeschema m_colorSettings = nullptr; - m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); + m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); m_userUnits = EDA_UNITS::MILLIMETRES; - m_PolarCoords = false; + m_polarCoords = false; m_findReplaceData = new wxFindReplaceData( wxFR_DOWN ); m_auimgr.SetFlags(wxAUI_MGR_DEFAULT); @@ -137,10 +137,10 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame // Create child subwindows. GetClientSize( &m_FrameSize.x, &m_FrameSize.y ); m_FramePos.x = m_FramePos.y = 0; - m_FrameSize.y -= m_MsgFrameHeight; + m_FrameSize.y -= m_msgFrameHeight; m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_FrameSize.y ), - wxSize( m_FrameSize.x, m_MsgFrameHeight ) ); + wxSize( m_FrameSize.x, m_msgFrameHeight ) ); m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() ); } @@ -541,7 +541,7 @@ void EDA_DRAW_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) // Read units used in dialogs and toolbars SetUserUnits( static_cast( aCfg->m_System.units ) ); - m_UndoRedoCountMax = aCfg->m_System.max_undo_items; + m_undoRedoCountMax = aCfg->m_System.max_undo_items; m_firstRunDialogSetting = aCfg->m_System.first_run_shown; m_galDisplayOptions.ReadConfig( *cmnCfg, *window, this ); diff --git a/common/eda_item.cpp b/common/eda_item.cpp index c0dfcbf817..15e9bd18c3 100644 --- a/common/eda_item.cpp +++ b/common/eda_item.cpp @@ -49,30 +49,30 @@ static const BITMAP_OPAQUE dummy_xpm[1] = {{ dummy_png, sizeof( dummy_png ), "du EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ) : - m_StructType( idType ), - m_Status( 0 ), - m_Parent( parent ), + m_structType( idType ), + m_status( 0 ), + m_parent( parent ), m_forceVisible( false ), - m_Flags( 0 ) + m_flags( 0 ) { } EDA_ITEM::EDA_ITEM( KICAD_T idType ) : - m_StructType( idType ), - m_Status( 0 ), - m_Parent( nullptr ), + m_structType( idType ), + m_status( 0 ), + m_parent( nullptr ), m_forceVisible( false ), - m_Flags( 0 ) + m_flags( 0 ) { } EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) : m_Uuid( base.m_Uuid ), - m_StructType( base.m_StructType ), - m_Status( base.m_Status ), - m_Parent( base.m_Parent ), + m_structType( base.m_structType ), + m_status( base.m_status ), + m_parent( base.m_parent ), m_forceVisible( base.m_forceVisible ), - m_Flags( base.m_Flags ) + m_flags( base.m_flags ) { } @@ -81,8 +81,8 @@ void EDA_ITEM::SetModified() SetFlags( IS_CHANGED ); // If this a child object, then the parent modification state also needs to be set. - if( m_Parent ) - m_Parent->SetModified(); + if( m_parent ) + m_parent->SetModified(); } @@ -194,10 +194,10 @@ EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem ) { // do not call initVars() - m_StructType = aItem.m_StructType; - m_Flags = aItem.m_Flags; - m_Status = aItem.m_Status; - m_Parent = aItem.m_Parent; + m_structType = aItem.m_structType; + m_flags = aItem.m_flags; + m_status = aItem.m_status; + m_parent = aItem.m_parent; m_forceVisible = aItem.m_forceVisible; return *this; diff --git a/common/eda_rect.cpp b/common/eda_rect.cpp index e962072a95..e5d64cd033 100644 --- a/common/eda_rect.cpp +++ b/common/eda_rect.cpp @@ -34,30 +34,30 @@ void EDA_RECT::Normalize() { - if( m_Size.y < 0 ) + if( m_size.y < 0 ) { - m_Size.y = -m_Size.y; - m_Pos.y -= m_Size.y; + m_size.y = -m_size.y; + m_pos.y -= m_size.y; } - if( m_Size.x < 0 ) + if( m_size.x < 0 ) { - m_Size.x = -m_Size.x; - m_Pos.x -= m_Size.x; + m_size.x = -m_size.x; + m_pos.x -= m_size.x; } } void EDA_RECT::Move( const wxPoint& aMoveVector ) { - m_Pos += aMoveVector; + m_pos += aMoveVector; } bool EDA_RECT::Contains( const wxPoint& aPoint ) const { - wxPoint rel_pos = aPoint - m_Pos; - wxSize size = m_Size; + wxPoint rel_pos = aPoint - m_pos; + wxSize size = m_size; if( size.x < 0 ) { @@ -160,13 +160,13 @@ bool EDA_RECT::Intersects( const EDA_RECT& aRect ) const rect.Normalize(); // ensure size is >= 0 // calculate the left common area coordinate: - int left = std::max( me.m_Pos.x, rect.m_Pos.x ); + int left = std::max( me.m_pos.x, rect.m_pos.x ); // calculate the right common area coordinate: - int right = std::min( me.m_Pos.x + me.m_Size.x, rect.m_Pos.x + rect.m_Size.x ); + int right = std::min( me.m_pos.x + me.m_size.x, rect.m_pos.x + rect.m_size.x ); // calculate the upper common area coordinate: - int top = std::max( me.m_Pos.y, aRect.m_Pos.y ); + int top = std::max( me.m_pos.y, aRect.m_pos.y ); // calculate the lower common area coordinate: - int bottom = std::min( me.m_Pos.y + me.m_Size.y, rect.m_Pos.y + rect.m_Size.y ); + int bottom = std::min( me.m_pos.y + me.m_size.y, rect.m_pos.y + rect.m_size.y ); // if a common area exists, it must have a positive (null accepted) size if( left <= right && top <= bottom ) @@ -230,10 +230,10 @@ bool EDA_RECT::Intersects( const EDA_RECT& aRect, double aRot ) const /* Test A : Any corners exist in rotated rect? */ - corners[0] = m_Pos; - corners[1] = m_Pos + wxPoint( m_Size.x, 0 ); - corners[2] = m_Pos + wxPoint( m_Size.x, m_Size.y ); - corners[3] = m_Pos + wxPoint( 0, m_Size.y ); + corners[0] = m_pos; + corners[1] = m_pos + wxPoint( m_size.x, 0 ); + corners[2] = m_pos + wxPoint( m_size.x, m_size.y ); + corners[3] = m_pos + wxPoint( 0, m_size.y ); wxPoint rCentre = aRect.Centre(); @@ -362,65 +362,65 @@ EDA_RECT& EDA_RECT::Inflate( int aDelta ) EDA_RECT& EDA_RECT::Inflate( wxCoord dx, wxCoord dy ) { - if( m_Size.x >= 0 ) + if( m_size.x >= 0 ) { - if( m_Size.x < -2 * dx ) + if( m_size.x < -2 * dx ) { // Don't allow deflate to eat more width than we have, - m_Pos.x += m_Size.x / 2; - m_Size.x = 0; + m_pos.x += m_size.x / 2; + m_size.x = 0; } else { // The inflate is valid. - m_Pos.x -= dx; - m_Size.x += 2 * dx; + m_pos.x -= dx; + m_size.x += 2 * dx; } } else // size.x < 0: { - if( m_Size.x > -2 * dx ) + if( m_size.x > -2 * dx ) { // Don't allow deflate to eat more width than we have, - m_Pos.x -= m_Size.x / 2; - m_Size.x = 0; + m_pos.x -= m_size.x / 2; + m_size.x = 0; } else { // The inflate is valid. - m_Pos.x += dx; - m_Size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0 + m_pos.x += dx; + m_size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0 } } - if( m_Size.y >= 0 ) + if( m_size.y >= 0 ) { - if( m_Size.y < -2 * dy ) + if( m_size.y < -2 * dy ) { // Don't allow deflate to eat more height than we have, - m_Pos.y += m_Size.y / 2; - m_Size.y = 0; + m_pos.y += m_size.y / 2; + m_size.y = 0; } else { // The inflate is valid. - m_Pos.y -= dy; - m_Size.y += 2 * dy; + m_pos.y -= dy; + m_size.y += 2 * dy; } } else // size.y < 0: { - if( m_Size.y > 2 * dy ) + if( m_size.y > 2 * dy ) { // Don't allow deflate to eat more height than we have, - m_Pos.y -= m_Size.y / 2; - m_Size.y = 0; + m_pos.y -= m_size.y / 2; + m_size.y = 0; } else { // The inflate is valid. - m_Pos.y += dy; - m_Size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0 + m_pos.y += dy; + m_size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0 } } @@ -434,8 +434,8 @@ void EDA_RECT::Merge( const EDA_RECT& aRect ) { if( aRect.IsValid() ) { - m_Pos = aRect.GetPosition(); - m_Size = aRect.GetSize(); + m_pos = aRect.GetPosition(); + m_size = aRect.GetSize(); m_init = true; } return; @@ -448,8 +448,8 @@ void EDA_RECT::Merge( const EDA_RECT& aRect ) wxPoint rect_end = rect.GetEnd(); // Change origin and size in order to contain the given rect - m_Pos.x = std::min( m_Pos.x, rect.m_Pos.x ); - m_Pos.y = std::min( m_Pos.y, rect.m_Pos.y ); + m_pos.x = std::min( m_pos.x, rect.m_pos.x ); + m_pos.y = std::min( m_pos.y, rect.m_pos.y ); end.x = std::max( end.x, rect_end.x ); end.y = std::max( end.y, rect_end.y ); SetEnd( end ); @@ -460,8 +460,8 @@ void EDA_RECT::Merge( const wxPoint& aPoint ) { if( !m_init ) { - m_Pos = aPoint; - m_Size = wxSize( 0, 0 ); + m_pos = aPoint; + m_size = wxSize( 0, 0 ); m_init = true; return; } @@ -470,8 +470,8 @@ void EDA_RECT::Merge( const wxPoint& aPoint ) wxPoint end = GetEnd(); // Change origin and size in order to contain the given rect - m_Pos.x = std::min( m_Pos.x, aPoint.x ); - m_Pos.y = std::min( m_Pos.y, aPoint.y ); + m_pos.x = std::min( m_pos.x, aPoint.x ); + m_pos.y = std::min( m_pos.y, aPoint.y ); end.x = std::max( end.x, aPoint.x ); end.y = std::max( end.y, aPoint.y ); SetEnd( end ); diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 5fbea8f2bd..9e8eb29f53 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -266,7 +266,7 @@ void SCH_EDIT_FRAME::ConvertPart( SCH_COMPONENT* aComponent ) TestDanglingEnds(); aComponent->ClearFlags(); - aComponent->SetFlags( savedFlags ); // Restore m_Flags (modified by SetConvert()) + aComponent->SetFlags( savedFlags ); // Restore m_flags (modified by SetConvert()) // If selected make sure all the now-included pins are selected if( aComponent->IsSelected() ) diff --git a/eeschema/lib_arc.cpp b/eeschema/lib_arc.cpp index f6e71fef87..affc245d84 100644 --- a/eeschema/lib_arc.cpp +++ b/eeschema/lib_arc.cpp @@ -100,7 +100,7 @@ bool LIB_ARC::HitTest( const wxPoint& aRefPoint, int aAccuracy ) const bool LIB_ARC::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) + if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) ) return false; wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() ); diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index d4a31555a6..ba1ec9f744 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -262,7 +262,7 @@ bool LIB_BEZIER::HitTest( const wxPoint& aRefPos, int aAccuracy ) const bool LIB_BEZIER::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) + if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) ) return false; EDA_RECT sel = aRect; diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index 9b3b6a36f0..444d59eed8 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -60,7 +60,7 @@ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef, int aAccuracy ) const bool LIB_CIRCLE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) + if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) ) return false; wxPoint center = DefaultTransform.TransformCoordinate( GetPosition() ); diff --git a/eeschema/lib_field.cpp b/eeschema/lib_field.cpp index 5b86d02dc3..568fea431c 100644 --- a/eeschema/lib_field.cpp +++ b/eeschema/lib_field.cpp @@ -73,7 +73,7 @@ LIB_FIELD& LIB_FIELD::operator=( const LIB_FIELD& field ) { m_id = field.m_id; m_name = field.m_name; - m_Parent = field.m_Parent; + m_parent = field.m_parent; SetText( field.GetText() ); SetEffects( field ); @@ -131,7 +131,7 @@ bool LIB_FIELD::HitTest( const wxPoint& aPosition, int aAccuracy ) const // Reference designator text has one or 2 additional character (displays U? or U?A) if( m_id == REFERENCE_FIELD ) { - const LIB_PART* parent = dynamic_cast( m_Parent ); + const LIB_PART* parent = dynamic_cast( m_parent ); wxString extended_text = tmp_text.GetText(); extended_text.Append('?'); @@ -169,7 +169,7 @@ void LIB_FIELD::Copy( LIB_FIELD* aTarget ) const aTarget->CopyText( *this ); aTarget->SetEffects( *this ); - aTarget->SetParent( m_Parent ); + aTarget->SetParent( m_parent ); } diff --git a/eeschema/lib_item.cpp b/eeschema/lib_item.cpp index feca13aff3..dc9a31c44b 100644 --- a/eeschema/lib_item.cpp +++ b/eeschema/lib_item.cpp @@ -42,7 +42,7 @@ LIB_ITEM::LIB_ITEM( KICAD_T aType, m_Unit = aUnit; m_Convert = aConvert; m_Fill = aFillType; - m_Parent = (EDA_ITEM*) aComponent; + m_parent = (EDA_ITEM*) aComponent; m_isFillable = false; } @@ -119,7 +119,7 @@ bool LIB_ITEM::operator<( const LIB_ITEM& aOther ) const bool LIB_ITEM::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) + if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) ) return false; EDA_RECT sel = aRect; diff --git a/eeschema/lib_item.h b/eeschema/lib_item.h index 7840018000..4a1e5d2025 100644 --- a/eeschema/lib_item.h +++ b/eeschema/lib_item.h @@ -182,7 +182,7 @@ public: LIB_PART* GetParent() const { - return (LIB_PART*) m_Parent; + return (LIB_PART*) m_parent; } void ViewGetLayers( int aLayers[], int& aCount ) const override; diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 5b8bab1505..8eec18e9a9 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -150,7 +150,7 @@ bool LIB_PIN::HitTest( const wxPoint& aPosition, int aAccuracy ) const bool LIB_PIN::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) + if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) ) return false; EDA_RECT sel = aRect; diff --git a/eeschema/lib_polyline.cpp b/eeschema/lib_polyline.cpp index 526556e256..c04a6f5da0 100644 --- a/eeschema/lib_polyline.cpp +++ b/eeschema/lib_polyline.cpp @@ -247,7 +247,7 @@ bool LIB_POLYLINE::HitTest( const wxPoint& aPosition, int aAccuracy ) const bool LIB_POLYLINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) + if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) ) return false; EDA_RECT sel = aRect; diff --git a/eeschema/lib_text.cpp b/eeschema/lib_text.cpp index 66847e7570..65fd491c49 100644 --- a/eeschema/lib_text.cpp +++ b/eeschema/lib_text.cpp @@ -80,7 +80,7 @@ EDA_ITEM* LIB_TEXT::Clone() const newitem->m_Unit = m_Unit; newitem->m_Convert = m_Convert; - newitem->m_Flags = m_Flags; + newitem->m_flags = m_flags; newitem->SetText( GetText() ); newitem->SetEffects( *this ); diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index 6e9e3ac042..07b1f05dd8 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -147,7 +147,7 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_PART& aPart, SCH_SHEET_PATH* aSheet, PICKED_SY SCH_COMPONENT::SCH_COMPONENT( const SCH_COMPONENT& aComponent ) : SCH_ITEM( aComponent ) { - m_Parent = aComponent.m_Parent; + m_parent = aComponent.m_parent; m_Pos = aComponent.m_Pos; m_unit = aComponent.m_unit; m_convert = aComponent.m_convert; @@ -1759,7 +1759,7 @@ bool SCH_COMPONENT::HitTest( const wxPoint& aPosition, int aAccuracy ) const bool SCH_COMPONENT::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & STRUCT_DELETED || m_Flags & SKIP_STRUCT ) + if( m_flags & STRUCT_DELETED || m_flags & SKIP_STRUCT ) return false; EDA_RECT rect = aRect; diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 52582c9637..2f3e53f0fa 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -75,7 +75,7 @@ void SCH_FIELD::SetId( int aId ) { m_id = aId; - if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) + if( m_parent && m_parent->Type() == SCH_SHEET_T ) { switch( m_id ) { @@ -109,7 +109,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const } else { - SCH_COMPONENT* component = static_cast( m_Parent ); + SCH_COMPONENT* component = static_cast( m_parent ); if( component->ResolveTextVar( token, aDepth + 1 ) ) return true; @@ -127,7 +127,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const std::function sheetResolver = [&]( wxString* token ) -> bool { - SCH_SHEET* sheet = static_cast( m_Parent ); + SCH_SHEET* sheet = static_cast( m_parent ); return sheet->ResolveTextVar( token, aDepth + 1 ); }; @@ -142,9 +142,9 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const if( aDepth < 10 ) { - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) text = ExpandTextVars( text, &symbolResolver, project ); - else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) + else if( m_parent && m_parent->Type() == SCH_SHEET_T ) text = ExpandTextVars( text, &sheetResolver, project ); else text = ExpandTextVars( text, nullptr, project ); @@ -154,9 +154,9 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const // WARNING: the IDs of FIELDS and SHEETS overlap, so one must check *both* the // id and the parent's type. - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* component = static_cast( m_Parent ); + SCH_COMPONENT* component = static_cast( m_parent ); if( m_id == REFERENCE_FIELD ) { @@ -166,7 +166,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const text << LIB_PART::SubReference( component->GetUnit() ); } } - else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) + else if( m_parent && m_parent->Type() == SCH_SHEET_T ) { if( m_id == SHEETFILENAME ) text = _( "File:" ) + wxS( " " )+ text; @@ -196,9 +196,9 @@ void SCH_FIELD::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) // Calculate the text orientation according to the component orientation. orient = GetTextAngle(); - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); if( parentComponent && parentComponent->GetTransform().y1 ) // Rotate component 90 degrees. { @@ -263,9 +263,9 @@ const EDA_RECT SCH_FIELD::GetBoundingBox() const // Now, apply the component transform (mirror/rot) TRANSFORM transform; - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); // Due to the Y axis direction, we must mirror the bounding box, // relative to the text position: @@ -326,12 +326,12 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData ) if( !IsVisible() && !searchHiddenFields ) return false; - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T && m_id == REFERENCE_FIELD ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T && m_id == REFERENCE_FIELD ) { if( searchAndReplace && !replaceReferences ) return false; - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); wxASSERT( aAuxData ); // Take sheet path into account which effects the reference field and the unit for @@ -354,9 +354,9 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData ) bool SCH_FIELD::IsReplaceable() const { - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); if( m_id == VALUE_FIELD ) { @@ -366,7 +366,7 @@ bool SCH_FIELD::IsReplaceable() const return false; } } - else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) + else if( m_parent && m_parent->Type() == SCH_SHEET_T ) { // See comments in SCH_FIELD::Replace(), below. if( m_id == SHEETFILENAME ) @@ -381,9 +381,9 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData ) { bool isReplaced = false; - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); if( m_id == REFERENCE_FIELD ) { @@ -405,7 +405,7 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData ) isReplaced = EDA_TEXT::Replace( aSearchData ); } } - else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) + else if( m_parent && m_parent->Type() == SCH_SHEET_T ) { isReplaced = EDA_TEXT::Replace( aSearchData ); @@ -443,9 +443,9 @@ wxString SCH_FIELD::GetName( bool aUseDefaultName ) const return m_name; else if( aUseDefaultName ) { - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) return TEMPLATE_FIELDNAME::GetDefaultFieldName( m_id ); - else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) + else if( m_parent && m_parent->Type() == SCH_SHEET_T ) return SCH_SHEET::GetDefaultFieldName( m_id ); } @@ -455,7 +455,7 @@ wxString SCH_FIELD::GetName( bool aUseDefaultName ) const wxString SCH_FIELD::GetCanonicalName() const { - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { switch( m_id ) { @@ -465,7 +465,7 @@ wxString SCH_FIELD::GetCanonicalName() const case DATASHEET_FIELD: return wxT( "Datasheet" ); } } - else if( m_Parent && m_Parent->Type() == SCH_SHEET_T ) + else if( m_parent && m_parent->Type() == SCH_SHEET_T ) { switch( m_id ) { @@ -480,7 +480,7 @@ wxString SCH_FIELD::GetCanonicalName() const BITMAP_DEF SCH_FIELD::GetMenuImage() const { - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { switch( m_id ) { @@ -543,9 +543,9 @@ void SCH_FIELD::Plot( PLOTTER* aPlotter ) // Calculate the text orientation, according to the component orientation/mirror int orient = GetTextAngle(); - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); if( parentComponent->GetTransform().y1 ) // Rotate component 90 deg. { @@ -582,9 +582,9 @@ void SCH_FIELD::SetPosition( const wxPoint& aPosition ) // Actual positions are calculated by the rotation/mirror transform of the // parent component of the field. The inverse transform is used to calculate // the position relative to the parent component. - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); wxPoint relativePos = aPosition - parentComponent->GetPosition(); relativePos = parentComponent->GetTransform(). @@ -600,9 +600,9 @@ void SCH_FIELD::SetPosition( const wxPoint& aPosition ) wxPoint SCH_FIELD::GetPosition() const { - if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) + if( m_parent && m_parent->Type() == SCH_COMPONENT_T ) { - SCH_COMPONENT* parentComponent = static_cast( m_Parent ); + SCH_COMPONENT* parentComponent = static_cast( m_parent ); wxPoint relativePos = GetTextPos() - parentComponent->GetPosition(); relativePos = parentComponent->GetTransform().TransformCoordinate( relativePos ); @@ -616,7 +616,7 @@ wxPoint SCH_FIELD::GetPosition() const wxPoint SCH_FIELD::GetParentPosition() const { - return m_Parent ? m_Parent->GetPosition() : wxPoint( 0, 0 ); + return m_parent ? m_parent->GetPosition() : wxPoint( 0, 0 ); } diff --git a/eeschema/sch_item.cpp b/eeschema/sch_item.cpp index 52def894ac..e1b310d486 100644 --- a/eeschema/sch_item.cpp +++ b/eeschema/sch_item.cpp @@ -137,7 +137,7 @@ void SCH_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const bool SCH_ITEM::IsConnected( const wxPoint& aPosition ) const { - if( ( m_Flags & STRUCT_DELETED ) || ( m_Flags & SKIP_STRUCT ) ) + if(( m_flags & STRUCT_DELETED ) || ( m_flags & SKIP_STRUCT ) ) return false; return doIsConnected( aPosition ); diff --git a/eeschema/sch_junction.cpp b/eeschema/sch_junction.cpp index 8ad20df4ff..99a2ce0285 100644 --- a/eeschema/sch_junction.cpp +++ b/eeschema/sch_junction.cpp @@ -194,7 +194,7 @@ bool SCH_JUNCTION::HitTest( const wxPoint& aPosition, int aAccuracy ) const bool SCH_JUNCTION::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & STRUCT_DELETED || m_Flags & SKIP_STRUCT ) + if( m_flags & STRUCT_DELETED || m_flags & SKIP_STRUCT ) return false; if( aContained ) diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index 3b4492611a..105921fb04 100644 --- a/eeschema/sch_line.cpp +++ b/eeschema/sch_line.cpp @@ -634,10 +634,10 @@ std::vector SCH_LINE::GetConnectionPoints() const void SCH_LINE::GetSelectedPoints( std::vector< wxPoint >& aPoints ) const { - if( m_Flags & STARTPOINT ) + if( m_flags & STARTPOINT ) aPoints.push_back( m_start ); - if( m_Flags & ENDPOINT ) + if( m_flags & ENDPOINT ) aPoints.push_back( m_end ); } @@ -727,7 +727,7 @@ bool SCH_LINE::HitTest( const wxPoint& aPosition, int aAccuracy ) const bool SCH_LINE::HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const { - if( m_Flags & ( STRUCT_DELETED | SKIP_STRUCT ) ) + if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) ) return false; EDA_RECT rect = aRect; diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index d6bb29e9ba..14b5fad5b3 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -166,7 +166,7 @@ public: * @return The sheet that is the parent of this sheet pin or NULL if it does * not have a parent. */ - SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_Parent; } + SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_parent; } #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const override; diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 2a40fd9b00..1754e5c36e 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -478,8 +478,8 @@ void SCH_TEXT::GetContextualTextVars( wxArrayString* aVars ) const if( Type() == SCH_GLOBAL_LABEL_T || Type() == SCH_HIER_LABEL_T || Type() == SCH_SHEET_PIN_T ) aVars->push_back( wxT( "CONNECTION_TYPE" ) ); - if( Type() == SCH_SHEET_PIN_T && m_Parent ) - static_cast( m_Parent )->GetContextualTextVars( aVars ); + if( Type() == SCH_SHEET_PIN_T && m_parent ) + static_cast( m_parent )->GetContextualTextVars( aVars ); } @@ -497,9 +497,9 @@ wxString SCH_TEXT::GetShownText( int aDepth ) const return true; } - if( Type() == SCH_SHEET_PIN_T && m_Parent ) + if( Type() == SCH_SHEET_PIN_T && m_parent ) { - SCH_SHEET* sheet = static_cast( m_Parent ); + SCH_SHEET* sheet = static_cast( m_parent ); if( sheet->ResolveTextVar( token, aDepth ) ) return true; diff --git a/gerbview/gerber_draw_item.cpp b/gerbview/gerber_draw_item.cpp index 8a8c339a43..5474388349 100644 --- a/gerbview/gerber_draw_item.cpp +++ b/gerbview/gerber_draw_item.cpp @@ -919,12 +919,12 @@ void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os ) const { NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << - " shape=\"" << m_Shape << '"' << - " addr=\"" << std::hex << this << std::dec << '"' << - " layer=\"" << GetLayer() << '"' << - " size=\"" << m_Size << '"' << - " flags=\"" << m_Flags << '"' << - " status=\"" << GetStatus() << '"' << + " shape=\"" << m_Shape << '"' << + " addr=\"" << std::hex << this << std::dec << '"' << + " layer=\"" << GetLayer() << '"' << + " size=\"" << m_Size << '"' << + " flags=\"" << m_flags << '"' << + " status=\"" << GetStatus() << '"' << "" << ""; diff --git a/include/class_board_item.h b/include/board_item.h similarity index 99% rename from include/class_board_item.h rename to include/board_item.h index 32fe241151..0a39fb46a0 100644 --- a/include/class_board_item.h +++ b/include/board_item.h @@ -22,11 +22,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file class_board_item.h - * @brief Classes BOARD_ITEM and BOARD_CONNECTED_ITEM. - */ - #ifndef BOARD_ITEM_STRUCT_H #define BOARD_ITEM_STRUCT_H @@ -181,7 +176,7 @@ public: */ virtual std::shared_ptr GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const; - BOARD_ITEM_CONTAINER* GetParent() const { return (BOARD_ITEM_CONTAINER*) m_Parent; } + BOARD_ITEM_CONTAINER* GetParent() const { return (BOARD_ITEM_CONTAINER*) m_parent; } /** * Function GetLayer diff --git a/include/collector.h b/include/collector.h index 1cfc4b1f63..8733b2ef54 100644 --- a/include/collector.h +++ b/include/collector.h @@ -57,16 +57,16 @@ protected: std::vector m_list; // Primary list of most likely items std::vector m_backupList; // Secondary list with items removed by heuristics - const KICAD_T* m_scanTypes; - INSPECTOR_FUNC m_inspector; - wxPoint m_refPos; // Reference position used to generate the collection. - EDA_RECT m_refBox; // Selection rectangle used to generate the collection. + const KICAD_T* m_scanTypes; + INSPECTOR_FUNC m_inspector; + wxPoint m_refPos; // Reference position used to generate the collection. + EDA_RECT m_refBox; // Selection rectangle used to generate the collection. public: - int m_Threshold; // Hit-test threshold in internal units. + int m_Threshold; // Hit-test threshold in internal units. - wxString m_MenuTitle; // The title of selection disambiguation menu (if needed) - bool m_MenuCancelled; // Indicates selection disambiguation menu was cancelled + wxString m_MenuTitle; // The title of selection disambiguation menu (if needed) + bool m_MenuCancelled; // Indicates selection disambiguation menu was cancelled public: COLLECTOR() : diff --git a/include/commit.h b/include/commit.h index b6e8d115fa..4c1af90210 100644 --- a/include/commit.h +++ b/include/commit.h @@ -147,14 +147,9 @@ public: protected: struct COMMIT_LINE { - ///> Main item that is added/deleted/modified - EDA_ITEM* m_item; - - ///> Optional copy of the item - EDA_ITEM* m_copy; - - ///> Modification type - CHANGE_TYPE m_type; + EDA_ITEM* m_item; ///> Main item that is added/deleted/modified + EDA_ITEM* m_copy; ///> Optional copy of the item + CHANGE_TYPE m_type; ///> Modification type }; // Should be called in Push() & Revert() methods diff --git a/include/core/typeinfo.h b/include/core/typeinfo.h index 786d8dc156..5fdc184048 100644 --- a/include/core/typeinfo.h +++ b/include/core/typeinfo.h @@ -73,7 +73,7 @@ class EDA_ITEM; /** * Enum KICAD_T - * is the set of class identification values, stored in EDA_ITEM::m_StructType + * is the set of class identification values, stored in EDA_ITEM::m_structType */ enum KICAD_T { diff --git a/include/eda_draw_frame.h b/include/eda_draw_frame.h index 2e2cd474a4..b7e88f6217 100644 --- a/include/eda_draw_frame.h +++ b/include/eda_draw_frame.h @@ -73,7 +73,7 @@ class EDA_DRAW_FRAME : public KIWAY_PLAYER KIGFX::GAL_DISPLAY_OPTIONS m_galDisplayOptions; /// Default display origin transforms object - ORIGIN_TRANSFORMS m_OriginTransforms; + ORIGIN_TRANSFORMS m_originTransforms; protected: wxSocketServer* m_socketServer; @@ -85,9 +85,9 @@ protected: COLOR4D m_gridColor; // Grid color COLOR4D m_drawBgColor; // The background color of the draw canvas; BLACK for // Pcbnew, BLACK or WHITE for eeschema - int m_UndoRedoCountMax; // Default Undo/Redo command Max depth, to be handed + int m_undoRedoCountMax; // Default Undo/Redo command Max depth, to be handed // to screens - bool m_PolarCoords; // For those frames that support polar coordinates + bool m_polarCoords; // For those frames that support polar coordinates bool m_showBorderAndTitleBlock; // Show the worksheet (border and title block). long m_firstRunDialogSetting; // Show first run dialog on startup @@ -105,7 +105,7 @@ protected: wxArrayString m_replaceStringHistoryList; EDA_MSG_PANEL* m_messagePanel; - int m_MsgFrameHeight; + int m_msgFrameHeight; COLOR_SETTINGS* m_colorSettings; @@ -188,8 +188,8 @@ public: /** * For those frames that support polar coordinates. */ - bool GetShowPolarCoords() const { return m_PolarCoords; } - void SetShowPolarCoords( bool aShow ) { m_PolarCoords = aShow; } + bool GetShowPolarCoords() const { return m_polarCoords; } + void SetShowPolarCoords( bool aShow ) { m_polarCoords = aShow; } void ToggleUserUnits() override; @@ -220,7 +220,7 @@ public: * Return a reference to the default ORIGIN_TRANSFORMS object */ virtual ORIGIN_TRANSFORMS& GetOriginTransforms() - { return m_OriginTransforms; } + { return m_originTransforms; } virtual const TITLE_BLOCK& GetTitleBlock() const = 0; diff --git a/include/eda_item.h b/include/eda_item.h index 776ac9df90..ac531b7134 100644 --- a/include/eda_item.h +++ b/include/eda_item.h @@ -94,7 +94,7 @@ typedef std::function< SEARCH_RESULT ( EDA_ITEM* aItem, void* aTestData ) > IN typedef const INSPECTOR_FUNC& INSPECTOR; /// std::function passed to nested users by ref, avoids copying std::function -// These define are used for the .m_Flags and .m_UndoRedoStatus member of the +// These define are used for the .m_flags and .m_UndoRedoStatus member of the // class EDA_ITEM // // NB: DO NOT ADD FLAGS ANYWHERE BUT AT THE END: THE FLAG-SET IS STORED AS AN INTEGER IN FILES. @@ -142,8 +142,7 @@ typedef unsigned STATUS_FLAGS; /** * EDA_ITEM - * is a base class for most all the KiCad significant classes, used in - * schematics and boards. + * is a base class for most all the KiCad significant classes used in schematics and boards. */ class EDA_ITEM : public KIGFX::VIEW_ITEM { @@ -152,17 +151,16 @@ public: private: /** - * Run time identification, _keep private_ so it can never be changed after - * a constructor sets it. See comment near SetType() regarding virtual - * functions. + * Run time identification, _keep private_ so it can never be changed after a ctor + * sets it. See comment near SetType() regarding virtual functions. */ - KICAD_T m_StructType; + KICAD_T m_structType; protected: - STATUS_FLAGS m_Status; - EDA_ITEM* m_Parent; ///< Linked list: Link (parent struct) + STATUS_FLAGS m_status; + EDA_ITEM* m_parent; ///< Linked list: Link (parent struct) bool m_forceVisible; - STATUS_FLAGS m_Flags; + STATUS_FLAGS m_flags; protected: EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ); @@ -175,23 +173,23 @@ public: /** * Function Type() * - * returns the type of object. This attribute should never be changed - * after a constructor sets it, so there is no public "setter" method. + * returns the type of object. This attribute should never be changed after a ctor sets + * it, so there is no public "setter" method. * @return KICAD_T - the type of object. */ - inline KICAD_T Type() const { return m_StructType; } + inline KICAD_T Type() const { return m_structType; } - EDA_ITEM* GetParent() const { return m_Parent; } - virtual void SetParent( EDA_ITEM* aParent ) { m_Parent = aParent; } + EDA_ITEM* GetParent() const { return m_parent; } + virtual void SetParent( EDA_ITEM* aParent ) { m_parent = aParent; } - inline bool IsModified() const { return m_Flags & IS_CHANGED; } - inline bool IsNew() const { return m_Flags & IS_NEW; } - inline bool IsMoving() const { return m_Flags & IS_MOVED; } - inline bool IsDragging() const { return m_Flags & IS_DRAGGED; } - inline bool IsWireImage() const { return m_Flags & IS_WIRE_IMAGE; } - inline bool IsSelected() const { return m_Flags & SELECTED; } - inline bool IsResized() const { return m_Flags & IS_RESIZED; } - inline bool IsBrightened() const { return m_Flags & BRIGHTENED; } + inline bool IsModified() const { return m_flags & IS_CHANGED; } + inline bool IsNew() const { return m_flags & IS_NEW; } + inline bool IsMoving() const { return m_flags & IS_MOVED; } + inline bool IsDragging() const { return m_flags & IS_DRAGGED; } + inline bool IsWireImage() const { return m_flags & IS_WIRE_IMAGE; } + inline bool IsSelected() const { return m_flags & SELECTED; } + inline bool IsResized() const { return m_flags & IS_RESIZED; } + inline bool IsBrightened() const { return m_flags & BRIGHTENED; } inline void SetWireImage() { SetFlags( IS_WIRE_IMAGE ); } inline void SetSelected() { SetFlags( SELECTED ); } @@ -204,31 +202,31 @@ public: int GetState( int type ) const { - return m_Status & type; + return m_status & type; } void SetState( int type, int state ) { if( state ) - m_Status |= type; // state = ON or OFF + m_status |= type; // state = ON or OFF else - m_Status &= ~type; + m_status &= ~type; } - STATUS_FLAGS GetStatus() const { return m_Status; } - void SetStatus( STATUS_FLAGS aStatus ) { m_Status = aStatus; } + STATUS_FLAGS GetStatus() const { return m_status; } + void SetStatus( STATUS_FLAGS aStatus ) { m_status = aStatus; } - void SetFlags( STATUS_FLAGS aMask ) { m_Flags |= aMask; } - void ClearFlags( STATUS_FLAGS aMask = EDA_ITEM_ALL_FLAGS ) { m_Flags &= ~aMask; } - STATUS_FLAGS GetFlags() const { return m_Flags; } - bool HasFlag( STATUS_FLAGS aFlag ) { return ( m_Flags & aFlag ) == aFlag; } + void SetFlags( STATUS_FLAGS aMask ) { m_flags |= aMask; } + void ClearFlags( STATUS_FLAGS aMask = EDA_ITEM_ALL_FLAGS ) { m_flags &= ~aMask; } + STATUS_FLAGS GetFlags() const { return m_flags; } + bool HasFlag( STATUS_FLAGS aFlag ) { return ( m_flags & aFlag ) == aFlag; } STATUS_FLAGS GetEditFlags() const { constexpr int mask = ( IS_NEW | IS_PASTED | IS_MOVED | IS_RESIZED | IS_DRAGGED | IS_WIRE_IMAGE | STRUCT_DELETED ); - return m_Flags & mask; + return m_flags & mask; } void ClearTempFlags() @@ -255,7 +253,7 @@ public: for( const KICAD_T* p = aScanTypes; *p != EOT; ++p ) { - if( m_StructType == *p ) + if( m_structType == *p ) return true; } diff --git a/include/eda_rect.h b/include/eda_rect.h index 362b4b51ed..3ec9e1c35d 100644 --- a/include/eda_rect.h +++ b/include/eda_rect.h @@ -44,25 +44,25 @@ class EDA_RECT { private: - wxPoint m_Pos; // Rectangle Origin - wxSize m_Size; // Rectangle Size + wxPoint m_pos; // Rectangle Origin + wxSize m_size; // Rectangle Size bool m_init; // Is the rectangle initialized public: EDA_RECT() : m_init( false ) { }; EDA_RECT( const wxPoint& aPos, const wxSize& aSize ) : - m_Pos( aPos ), - m_Size( aSize ), - m_init( true ) + m_pos( aPos ), + m_size( aSize ), + m_init( true ) { } virtual ~EDA_RECT() { }; wxPoint Centre() const { - return wxPoint( m_Pos.x + ( m_Size.x >> 1 ), - m_Pos.y + ( m_Size.y >> 1 ) ); + return wxPoint( m_pos.x + ( m_size.x >> 1 ), + m_pos.y + ( m_size.y >> 1 ) ); } /** @@ -100,28 +100,28 @@ public: */ bool Contains( const EDA_RECT& aRect ) const; - const wxSize GetSize() const { return m_Size; } + const wxSize GetSize() const { return m_size; } /** * @brief GetSizeMax * @return the max size dimension */ - int GetSizeMax() const { return ( m_Size.x > m_Size.y ) ? m_Size.x : m_Size.y; } + int GetSizeMax() const { return ( m_size.x > m_size.y ) ? m_size.x : m_size.y; } - int GetX() const { return m_Pos.x; } - int GetY() const { return m_Pos.y; } + int GetX() const { return m_pos.x; } + int GetY() const { return m_pos.y; } - const wxPoint GetOrigin() const { return m_Pos; } - const wxPoint GetPosition() const { return m_Pos; } - const wxPoint GetEnd() const { return wxPoint( m_Pos.x + m_Size.x, m_Pos.y + m_Size.y ); } - const wxPoint GetCenter() const { return wxPoint( m_Pos.x + ( m_Size.x / 2 ), m_Pos.y + ( m_Size.y / 2 ) ); } + const wxPoint GetOrigin() const { return m_pos; } + const wxPoint GetPosition() const { return m_pos; } + const wxPoint GetEnd() const { return wxPoint( m_pos.x + m_size.x, m_pos.y + m_size.y ); } + const wxPoint GetCenter() const { return wxPoint( m_pos.x + ( m_size.x / 2 ), m_pos.y + ( m_size.y / 2 ) ); } - int GetWidth() const { return m_Size.x; } - int GetHeight() const { return m_Size.y; } - int GetRight() const { return m_Pos.x + m_Size.x; } - int GetLeft() const { return m_Pos.x; } - int GetTop() const { return m_Pos.y; } - int GetBottom() const { return m_Pos.y + m_Size.y; } // Y axis from top to bottom + int GetWidth() const { return m_size.x; } + int GetHeight() const { return m_size.y; } + int GetRight() const { return m_pos.x + m_size.x; } + int GetLeft() const { return m_pos.x; } + int GetTop() const { return m_pos.y; } + int GetBottom() const { return m_pos.y + m_size.y; } // Y axis from top to bottom bool IsValid() const { @@ -130,62 +130,62 @@ public: void SetOrigin( const wxPoint &pos ) { - m_Pos = pos; + m_pos = pos; m_init = true; } void SetOrigin( int x, int y ) { - m_Pos.x = x; - m_Pos.y = y; + m_pos.x = x; + m_pos.y = y; m_init = true; } void SetSize( const wxSize &size ) { - m_Size = size; + m_size = size; m_init = true; } void SetSize( int w, int h ) { - m_Size.x = w; - m_Size.y = h; + m_size.x = w; + m_size.y = h; m_init = true; } void Offset( int dx, int dy ) { - m_Pos.x += dx; - m_Pos.y += dy; + m_pos.x += dx; + m_pos.y += dy; } void Offset( const wxPoint &offset ) { - m_Pos += offset; + m_pos += offset; } void SetX( int val ) { - m_Pos.x = val; + m_pos.x = val; m_init = true; } void SetY( int val ) { - m_Pos.y = val; + m_pos.y = val; m_init = true; } void SetWidth( int val ) { - m_Size.x = val; + m_size.x = val; m_init = true; } void SetHeight( int val ) { - m_Size.y = val; + m_size.y = val; m_init = true; } @@ -197,8 +197,8 @@ public: void SetEnd( const wxPoint &pos ) { - m_Size.x = pos.x - m_Pos.x; - m_Size.y = pos.y - m_Pos.y; + m_size.x = pos.x - m_pos.x; + m_size.y = pos.y - m_pos.y; m_init = true; } @@ -208,8 +208,8 @@ public: */ void RevertYAxis() { - m_Pos.y = -m_Pos.y; - m_Size.y = -m_Size.y; + m_pos.y = -m_pos.y; + m_size.y = -m_size.y; Normalize(); } @@ -291,9 +291,9 @@ public: */ operator wxRect() const { - EDA_RECT rect( m_Pos, m_Size ); + EDA_RECT rect( m_pos, m_size ); rect.Normalize(); - return wxRect( rect.m_Pos, rect.m_Size ); + return wxRect( rect.m_pos, rect.m_size ); } /** @@ -303,7 +303,7 @@ public: */ operator BOX2I() const { - EDA_RECT rect( m_Pos, m_Size ); + EDA_RECT rect( m_pos, m_size ); rect.Normalize(); return BOX2I( rect.GetOrigin(), rect.GetSize() ); } diff --git a/include/page_layout/ws_draw_item.h b/include/page_layout/ws_draw_item.h index 11736314b4..b3301111b6 100644 --- a/include/page_layout/ws_draw_item.h +++ b/include/page_layout/ws_draw_item.h @@ -66,7 +66,7 @@ protected: m_peer = aPeer; m_index = aIndex; m_penWidth = 0; - m_Flags = 0; + m_flags = 0; } public: diff --git a/include/pcb_group.h b/include/pcb_group.h index 24240c0c21..402e4d8fc7 100644 --- a/include/pcb_group.h +++ b/include/pcb_group.h @@ -36,7 +36,7 @@ #define CLASS_PCB_GROUP_H_ #include -#include +#include #include namespace KIGFX diff --git a/include/pcb_screen.h b/include/pcb_screen.h index 211eaa7e4e..c3a5e7dcf7 100644 --- a/include/pcb_screen.h +++ b/include/pcb_screen.h @@ -27,7 +27,7 @@ #include -#include +#include /* Handle info to display a board */ diff --git a/include/undo_redo_container.h b/include/undo_redo_container.h index 34b1edac56..13db340287 100644 --- a/include/undo_redo_container.h +++ b/include/undo_redo_container.h @@ -78,9 +78,9 @@ enum class UNDO_REDO { class ITEM_PICKER { private: - STATUS_FLAGS m_pickerFlags; /* a copy of m_Flags member. useful in mode/drag + STATUS_FLAGS m_pickerFlags; /* a copy of m_flags member. useful in mode/drag * undo/redo commands */ - UNDO_REDO m_undoRedoStatus; /* type of operation to undo/redo for this item */ + UNDO_REDO m_undoRedoStatus; /* type of operation to undo/redo for this item */ EDA_ITEM* m_pickedItem; /* Pointer on the schematic or board item that is concerned * (picked), or in undo redo commands, the copy of an * edited item. */ @@ -288,7 +288,7 @@ public: /** * Function SetPickerFlags - * set the flags of the picker (usually to the picked item m_Flags value) + * set the flags of the picker (usually to the picked item m_flags value) * @param aFlags The flag value to save in picker * @param aIdx Index of the picker in the picked list * @return True if the picker exists or false if does not exist diff --git a/pagelayout_editor/pl_editor_layout.h b/pagelayout_editor/pl_editor_layout.h index e11737c070..2213d07d1b 100644 --- a/pagelayout_editor/pl_editor_layout.h +++ b/pagelayout_editor/pl_editor_layout.h @@ -39,7 +39,7 @@ class PL_EDITOR_LAYOUT { private: - EDA_RECT m_BoundingBox; + EDA_RECT m_boundingBox; PAGE_INFO m_paper; TITLE_BLOCK m_titles; @@ -80,9 +80,9 @@ public: * may be called soon after ComputeBoundingBox() to return the same EDA_RECT, * as long as the CLASS_PL_EDITOR_LAYOUT has not changed. */ - const EDA_RECT GetBoundingBox() const { return m_BoundingBox; } + const EDA_RECT GetBoundingBox() const { return m_boundingBox; } - void SetBoundingBox( const EDA_RECT& aBox ) { m_BoundingBox = aBox; } + void SetBoundingBox( const EDA_RECT& aBox ) { m_boundingBox = aBox; } #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; diff --git a/pagelayout_editor/pl_editor_settings.h b/pagelayout_editor/pl_editor_settings.h index 5013f48920..0da9abfae9 100644 --- a/pagelayout_editor/pl_editor_settings.h +++ b/pagelayout_editor/pl_editor_settings.h @@ -35,23 +35,16 @@ public: virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override; - int m_CornerOrigin; - - int m_PropertiesFrameWidth; - + int m_CornerOrigin; + int m_PropertiesFrameWidth; wxString m_LastPaperSize; - - int m_LastCustomWidth; - - int m_LastCustomHeight; - - bool m_LastWasPortrait; - - bool m_BlackBackground; + int m_LastCustomWidth; + int m_LastCustomHeight; + bool m_LastWasPortrait; + bool m_BlackBackground; protected: - virtual std::string getLegacyFrameName() const override { return "PlEditorFrame"; } }; diff --git a/pcbnew/array_creator.h b/pcbnew/array_creator.h index b9f9228251..2edc32ddca 100644 --- a/pcbnew/array_creator.h +++ b/pcbnew/array_creator.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include /*! diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index ce88c3dfe6..f60632de98 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,9 +51,8 @@ #include #include -/* This is an odd place for this, but CvPcb won't link if it is - * in class_board_item.cpp like I first tried it. - */ +// This is an odd place for this, but CvPcb won't link if it's in board_item.cpp like I first +// tried it. wxPoint BOARD_ITEM::ZeroOffset( 0, 0 ); @@ -180,9 +179,9 @@ void BOARD::ClearProject() } -std::vector BOARD::ResolveDRCExclusions() +std::vector BOARD::ResolveDRCExclusions() { - for( MARKER_PCB* marker : GetBoard()->Markers() ) + for( PCB_MARKER* marker : GetBoard()->Markers() ) { auto i = m_designSettings->m_DrcExclusions.find( marker->Serialize() ); @@ -193,11 +192,11 @@ std::vector BOARD::ResolveDRCExclusions() } } - std::vector newMarkers; + std::vector newMarkers; for( const wxString& exclusionData : m_designSettings->m_DrcExclusions ) { - MARKER_PCB* marker = MARKER_PCB::Deserialize( exclusionData ); + PCB_MARKER* marker = PCB_MARKER::Deserialize( exclusionData ); if( marker ) { @@ -565,7 +564,7 @@ void BOARD::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode ) // this one uses a vector case PCB_MARKER_T: - m_markers.push_back( (MARKER_PCB*) aBoardItem ); + m_markers.push_back( (PCB_MARKER*) aBoardItem ); break; // this one uses a vector @@ -727,8 +726,8 @@ wxString BOARD::GetSelectMenuText( EDA_UNITS aUnits ) const void BOARD::DeleteMARKERs() { - // the vector does not know how to delete the MARKER_PCB, it holds pointers - for( MARKER_PCB* marker : m_markers ) + // the vector does not know how to delete the PCB_MARKER, it holds pointers + for( PCB_MARKER* marker : m_markers ) delete marker; m_markers.clear(); @@ -740,7 +739,7 @@ void BOARD::DeleteMARKERs( bool aWarningsAndErrors, bool aExclusions ) // Deleting lots of items from a vector can be very slow. Copy remaining items instead. MARKERS remaining; - for( MARKER_PCB* marker : m_markers ) + for( PCB_MARKER* marker : m_markers ) { if( ( marker->IsExcluded() && aExclusions ) || ( !marker->IsExcluded() && aWarningsAndErrors ) ) @@ -816,7 +815,7 @@ BOARD_ITEM* BOARD::GetItem( const KIID& aID ) const return drawing; } - for( MARKER_PCB* marker : m_markers ) + for( PCB_MARKER* marker : m_markers ) { if( marker->m_Uuid == aID ) return marker; @@ -864,7 +863,7 @@ void BOARD::FillItemMap( std::map& aMap ) for( BOARD_ITEM* drawing : Drawings() ) aMap[ drawing->m_Uuid ] = drawing; - for( MARKER_PCB* marker : m_markers ) + for( PCB_MARKER* marker : m_markers ) aMap[ marker->m_Uuid ] = marker; for( PCB_GROUP* group : m_groups ) @@ -1189,7 +1188,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T s break; case PCB_MARKER_T: - for( MARKER_PCB* marker : m_markers ) + for( PCB_MARKER* marker : m_markers ) { result = marker->Visit( inspector, testData, p ); diff --git a/pcbnew/board.h b/pcbnew/board.h index e68f7e5c0b..5b59383eaf 100644 --- a/pcbnew/board.h +++ b/pcbnew/board.h @@ -44,7 +44,7 @@ class BOARD; class ZONE; class TRACK; class PAD; -class MARKER_PCB; +class PCB_MARKER; class MSG_PANEL_ITEM; class NETLIST; class REPORTER; @@ -164,7 +164,7 @@ public: }; -DECL_VEC_FOR_SWIG( MARKERS, MARKER_PCB* ) +DECL_VEC_FOR_SWIG( MARKERS, PCB_MARKER* ) DECL_VEC_FOR_SWIG( ZONES, ZONE* ) DECL_DEQ_FOR_SWIG( TRACKS, TRACK* ) // Dequeue rather than Vector just so we can use moveUnflaggedItems in pcbnew_control.cpp @@ -408,7 +408,7 @@ public: /** * Rebuild DRC markers from the serialized data in BOARD_DESIGN_SETTINGS. */ - std::vector ResolveDRCExclusions(); + std::vector ResolveDRCExclusions(); /** * Reset all high light data to the init state diff --git a/pcbnew/board_connected_item.cpp b/pcbnew/board_connected_item.cpp index 08b06bfc2d..dfdcb01e18 100644 --- a/pcbnew/board_connected_item.cpp +++ b/pcbnew/board_connected_item.cpp @@ -24,7 +24,7 @@ */ #include -#include +#include #include #include #include diff --git a/pcbnew/board_connected_item.h b/pcbnew/board_connected_item.h index cfe5e111ff..718dc65598 100644 --- a/pcbnew/board_connected_item.h +++ b/pcbnew/board_connected_item.h @@ -26,7 +26,7 @@ #ifndef BOARD_CONNECTED_ITEM_H #define BOARD_CONNECTED_ITEM_H -#include +#include #include #include diff --git a/pcbnew/class_board_item.cpp b/pcbnew/board_item.cpp similarity index 100% rename from pcbnew/class_board_item.cpp rename to pcbnew/board_item.cpp diff --git a/pcbnew/board_item_container.h b/pcbnew/board_item_container.h index 8829669dc0..968ad37f43 100644 --- a/pcbnew/board_item_container.h +++ b/pcbnew/board_item_container.h @@ -27,7 +27,7 @@ #ifndef BOARD_ITEM_CONTAINER_H #define BOARD_ITEM_CONTAINER_H -#include +#include #include enum class ADD_MODE diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index fc5c2f7348..b965ca62f3 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -23,13 +23,13 @@ */ #include -#include // class BOARD_ITEM +#include // class BOARD_ITEM #include #include #include #include -#include +#include #include #include #include @@ -194,7 +194,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData ) PAD* pad = nullptr; bool pad_through = false; VIA* via = nullptr; - MARKER_PCB* marker = nullptr; + PCB_MARKER* marker = nullptr; ZONE* zone = nullptr; PCB_SHAPE* shape = nullptr; DIMENSION_BASE* dimension = nullptr; @@ -381,7 +381,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData ) break; case PCB_MARKER_T: - marker = static_cast( item ); + marker = static_cast( item ); break; default: diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h index 888622d515..9c641df292 100644 --- a/pcbnew/collectors.h +++ b/pcbnew/collectors.h @@ -35,7 +35,7 @@ #include #include // LAYER_COUNT, layer defs #include -#include +#include diff --git a/pcbnew/connectivity/connectivity_items.h b/pcbnew/connectivity/connectivity_items.h index ab08e625fa..970acf6605 100644 --- a/pcbnew/connectivity/connectivity_items.h +++ b/pcbnew/connectivity/connectivity_items.h @@ -26,8 +26,8 @@ */ -#ifndef PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_ -#define PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_ +#ifndef PCBNEW_CONNECTIVITY_ITEMS_H +#define PCBNEW_CONNECTIVITY_ITEMS_H #include #include @@ -175,32 +175,21 @@ public: private: BOARD_CONNECTED_ITEM* m_parent; - ///> list of items physically connected (touching) - CONNECTED_ITEMS m_connected; + CONNECTED_ITEMS m_connected; ///> list of items physically connected (touching) + CN_ANCHORS m_anchors; - CN_ANCHORS m_anchors; + bool m_canChangeNet; ///> can the net propagator modify the netcode? - ///> visited flag for the BFS scan - bool m_visited; - - ///> can the net propagator modify the netcode? - bool m_canChangeNet; - - ///> valid flag, used to identify garbage items (we use lazy removal) - bool m_valid; - - ///> mutex protecting this item's connected_items set to allow parallel connection threads - std::mutex m_listLock; + bool m_visited; ///> visited flag for the BFS scan + bool m_valid; ///> used to identify garbage items (we use lazy removal) + std::mutex m_listLock; ///> mutex protecting this item's connected_items set to + ///> allow parallel connection threads protected: - ///> dirty flag, used to identify recently added item not yet scanned into the connectivity search - bool m_dirty; - - ///> layer range over which the item exists - LAYER_RANGE m_layers; - - ///> bounding box for the item - BOX2I m_bbox; + bool m_dirty; ///> used to identify recently added item not yet + ///> scanned into the connectivity search + LAYER_RANGE m_layers; ///> layer range over which the item exists + BOX2I m_bbox; ///> bounding box for the item public: void Dump(); @@ -224,30 +213,13 @@ public: m_anchors.emplace_back( std::make_shared( aPos, this ) ); } - CN_ANCHORS& Anchors() - { - return m_anchors; - } - - void SetValid( bool aValid ) - { - m_valid = aValid; - } + CN_ANCHORS& Anchors() { return m_anchors; } - bool Valid() const - { - return m_valid; - } + void SetValid( bool aValid ) { m_valid = aValid; } + bool Valid() const { return m_valid; } - void SetDirty( bool aDirty ) - { - m_dirty = aDirty; - } - - bool Dirty() const - { - return m_dirty; - } + void SetDirty( bool aDirty ) { m_dirty = aDirty; } + bool Dirty() const { return m_dirty; } /** * Function SetLayers() @@ -304,30 +276,13 @@ public: return m_parent; } - const CONNECTED_ITEMS& ConnectedItems() const - { - return m_connected; - } + const CONNECTED_ITEMS& ConnectedItems() const { return m_connected; } + void ClearConnections() { m_connected.clear(); } - void ClearConnections() - { - m_connected.clear(); - } + void SetVisited( bool aVisited ) { m_visited = aVisited; } + bool Visited() const { return m_visited; } - void SetVisited( bool aVisited ) - { - m_visited = aVisited; - } - - bool Visited() const - { - return m_visited; - } - - bool CanChangeNet() const - { - return m_canChangeNet; - } + bool CanChangeNet() const { return m_canChangeNet; } void Connect( CN_ITEM* b ) { @@ -343,8 +298,8 @@ public: void RemoveInvalidRefs(); - virtual int AnchorCount() const; - virtual const VECTOR2I GetAnchor( int n ) const; + virtual int AnchorCount() const; + virtual const VECTOR2I GetAnchor( int n ) const; int Net() const { @@ -358,9 +313,9 @@ class CN_ZONE_LAYER : public CN_ITEM { public: CN_ZONE_LAYER( ZONE* aParent, PCB_LAYER_ID aLayer, bool aCanChangeNet, int aSubpolyIndex ) : - CN_ITEM( aParent, aCanChangeNet ), - m_subpolyIndex( aSubpolyIndex ), - m_layer( aLayer ) + CN_ITEM( aParent, aCanChangeNet ), + m_subpolyIndex( aSubpolyIndex ), + m_layer( aLayer ) { SHAPE_LINE_CHAIN outline = aParent->GetFilledPolysList( aLayer ).COutline( aSubpolyIndex ); @@ -382,7 +337,7 @@ public: bool ContainsPoint( const VECTOR2I p, int aAccuracy = 0 ) const { - auto zone = static_cast( Parent() ); + ZONE* zone = static_cast( Parent() ); int clearance = aAccuracy; if( zone->GetFilledPolysUseThickness() ) @@ -399,23 +354,23 @@ public: return m_bbox; } - virtual int AnchorCount() const override; - virtual const VECTOR2I GetAnchor( int n ) const override; + virtual int AnchorCount() const override; + virtual const VECTOR2I GetAnchor( int n ) const override; private: - std::vector m_testOutlinePoints; + std::vector m_testOutlinePoints; std::unique_ptr m_cachedPoly; - int m_subpolyIndex; - PCB_LAYER_ID m_layer; + int m_subpolyIndex; + PCB_LAYER_ID m_layer; }; class CN_LIST { private: - bool m_dirty; - bool m_hasInvalid; + bool m_dirty; + bool m_hasInvalid; - CN_RTREE m_index; + CN_RTREE m_index; protected: std::vector m_items; @@ -465,20 +420,10 @@ public: m_index.Query( aItem->BBox(), aItem->Layers(), aFunc ); } - void SetHasInvalid( bool aInvalid = true ) - { - m_hasInvalid = aInvalid; - } + void SetHasInvalid( bool aInvalid = true ) { m_hasInvalid = aInvalid; } - void SetDirty( bool aDirty = true ) - { - m_dirty = aDirty; - } - - bool IsDirty() const - { - return m_dirty; - } + void SetDirty( bool aDirty = true ) { m_dirty = aDirty; } + bool IsDirty() const { return m_dirty; } void RemoveInvalidItems( std::vector& aGarbage ); @@ -517,25 +462,17 @@ public: class CN_CLUSTER { private: - - bool m_conflicting = false; - int m_originNet = 0; - CN_ITEM* m_originPad = nullptr; + bool m_conflicting = false; + int m_originNet = 0; + CN_ITEM* m_originPad = nullptr; std::vector m_items; public: CN_CLUSTER(); ~CN_CLUSTER(); - bool HasValidNet() const - { - return m_originNet > 0; - } - - int OriginNet() const - { - return m_originNet; - } + bool HasValidNet() const { return m_originNet > 0; } + int OriginNet() const { return m_originNet; } wxString OriginNetName() const; @@ -543,25 +480,11 @@ public: bool Contains( const BOARD_CONNECTED_ITEM* aItem ); void Dump(); - int Size() const - { - return m_items.size(); - } + int Size() const { return m_items.size(); } - bool HasNet() const - { - return m_originNet > 0; - } - - bool IsOrphaned() const - { - return m_originPad == nullptr; - } + bool IsOrphaned() const { return m_originPad == nullptr; } - bool IsConflicting() const - { - return m_conflicting; - } + bool IsConflicting() const { return m_conflicting; } void Add( CN_ITEM* item ); @@ -574,4 +497,4 @@ public: typedef std::shared_ptr CN_CLUSTER_PTR; -#endif /* PCBNEW_CONNECTIVITY_CONNECTIVITY_ITEMS_H_ */ +#endif /* PCBNEW_CONNECTIVITY_ITEMS_H */ diff --git a/pcbnew/dialogs/dialog_create_array.h b/pcbnew/dialogs/dialog_create_array.h index fb1b9a2315..3057b2f028 100644 --- a/pcbnew/dialogs/dialog_create_array.h +++ b/pcbnew/dialogs/dialog_create_array.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 3ca5f3afce..0155463780 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include @@ -428,7 +428,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent ) { case 1: { - MARKER_PCB* marker = dynamic_cast( node->m_RcItem->GetParent() ); + PCB_MARKER* marker = dynamic_cast( node->m_RcItem->GetParent() ); if( marker ) { @@ -444,7 +444,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent ) case 2: { - MARKER_PCB* marker = dynamic_cast( node->m_RcItem->GetParent() ); + PCB_MARKER* marker = dynamic_cast( node->m_RcItem->GetParent() ); if( marker ) { @@ -465,7 +465,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent ) case 3: bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_ERROR; - for( MARKER_PCB* marker : m_brdEditor->GetBoard()->Markers() ) + for( PCB_MARKER* marker : m_brdEditor->GetBoard()->Markers() ) { if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() ) m_brdEditor->GetCanvas()->GetView()->Update( marker ); @@ -479,7 +479,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent ) case 4: bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_WARNING; - for( MARKER_PCB* marker : m_brdEditor->GetBoard()->Markers() ) + for( PCB_MARKER* marker : m_brdEditor->GetBoard()->Markers() ) { if( marker->GetRCItem()->GetErrorCode() == rcItem->GetErrorCode() ) m_brdEditor->GetCanvas()->GetView()->Update( marker ); @@ -494,7 +494,7 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent ) { bds().m_DRCSeverities[ rcItem->GetErrorCode() ] = RPT_SEVERITY_IGNORE; - std::vector& markers = m_brdEditor->GetBoard()->Markers(); + std::vector& markers = m_brdEditor->GetBoard()->Markers(); for( unsigned i = 0; i < markers.size(); ) { diff --git a/pcbnew/dialogs/dialog_drc.h b/pcbnew/dialogs/dialog_drc.h index c6d06fd355..99278ea6c4 100644 --- a/pcbnew/dialogs/dialog_drc.h +++ b/pcbnew/dialogs/dialog_drc.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/pcbnew/dialogs/dialog_find.cpp b/pcbnew/dialogs/dialog_find.cpp index edcdacb142..3da7152557 100644 --- a/pcbnew/dialogs/dialog_find.cpp +++ b/pcbnew/dialogs/dialog_find.cpp @@ -24,7 +24,7 @@ */ #include -#include +#include #include #include #include @@ -260,7 +260,7 @@ void DIALOG_FIND::search( bool aDirection ) if( FindIncludeMarkers ) { - for( MARKER_PCB* marker : m_frame->GetBoard()->Markers() ) + for( PCB_MARKER* marker : m_frame->GetBoard()->Markers() ) { if( marker->Matches( m_frame->GetFindReplaceData(), nullptr ) ) m_hitList.push_back( marker ); diff --git a/pcbnew/dialogs/dialog_find.h b/pcbnew/dialogs/dialog_find.h index 2904ce3475..06d9f49a30 100644 --- a/pcbnew/dialogs/dialog_find.h +++ b/pcbnew/dialogs/dialog_find.h @@ -31,7 +31,7 @@ #include #include -#include +#include #include diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index d888744391..57fd609f1e 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -229,7 +229,7 @@ void DIALOG_PLOT::reInitDialog() int knownViolations = 0; int exclusions = 0; - for( MARKER_PCB* marker : m_parent->GetBoard()->Markers() ) + for( PCB_MARKER* marker : m_parent->GetBoard()->Markers() ) { if( marker->IsExcluded() ) exclusions++; diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 955529301f..6989d114e0 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -305,7 +305,7 @@ void DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector +#include #include #include diff --git a/pcbnew/drc/drc_engine.h b/pcbnew/drc/drc_engine.h index 14207779a1..fc459b1c7d 100644 --- a/pcbnew/drc/drc_engine.h +++ b/pcbnew/drc/drc_engine.h @@ -36,7 +36,7 @@ class DRC_TEST_PROVIDER; class PCB_EDIT_FRAME; class BOARD_ITEM; class BOARD; -class MARKER_PCB; +class PCB_MARKER; class NETCLASS; class NETLIST; class NETINFO_ITEM; diff --git a/pcbnew/drc/drc_results_provider.h b/pcbnew/drc/drc_results_provider.h index 2bd688ae03..d383830e44 100644 --- a/pcbnew/drc/drc_results_provider.h +++ b/pcbnew/drc/drc_results_provider.h @@ -26,7 +26,7 @@ #define DRC_PROVIDER__H #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ private: BOARD* m_board; int m_severities; - std::vector m_filteredMarkers; + std::vector m_filteredMarkers; public: BOARD_DRC_ITEMS_PROVIDER( BOARD* aBoard ) : @@ -61,7 +61,7 @@ public: m_filteredMarkers.clear(); - for( MARKER_PCB* marker : m_board->Markers() ) + for( PCB_MARKER* marker : m_board->Markers() ) { int markerSeverity; @@ -84,7 +84,7 @@ public: int count = 0; - for( MARKER_PCB* marker : m_board->Markers() ) + for( PCB_MARKER* marker : m_board->Markers() ) { int markerSeverity; @@ -102,14 +102,14 @@ public: std::shared_ptr GetItem( int aIndex ) override { - MARKER_PCB* marker = m_filteredMarkers[ aIndex ]; + PCB_MARKER* marker = m_filteredMarkers[ aIndex ]; return marker ? marker->GetRCItem() : nullptr; } void DeleteItem( int aIndex, bool aDeep ) override { - MARKER_PCB* marker = m_filteredMarkers[ aIndex ]; + PCB_MARKER* marker = m_filteredMarkers[ aIndex ]; m_filteredMarkers.erase( m_filteredMarkers.begin() + aIndex ); if( aDeep ) diff --git a/pcbnew/drc/drc_rtree.h b/pcbnew/drc/drc_rtree.h index 58d55f79c4..1f6e50aae5 100644 --- a/pcbnew/drc/drc_rtree.h +++ b/pcbnew/drc/drc_rtree.h @@ -26,7 +26,7 @@ #define DRC_RTREE_H_ #include -#include +#include #include #include #include diff --git a/pcbnew/drc/drc_rule.cpp b/pcbnew/drc/drc_rule.cpp index 92ba26ffa3..276da272b8 100644 --- a/pcbnew/drc/drc_rule.cpp +++ b/pcbnew/drc/drc_rule.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include diff --git a/pcbnew/drc/drc_rule_condition.cpp b/pcbnew/drc/drc_rule_condition.cpp index 328c9a77c9..56cbb42a35 100644 --- a/pcbnew/drc/drc_rule_condition.cpp +++ b/pcbnew/drc/drc_rule_condition.cpp @@ -22,7 +22,7 @@ */ -#include +#include #include #include #include diff --git a/pcbnew/drc/drc_test_provider.h b/pcbnew/drc/drc_test_provider.h index 731066dc24..391a78fdcd 100644 --- a/pcbnew/drc/drc_test_provider.h +++ b/pcbnew/drc/drc_test_provider.h @@ -26,7 +26,7 @@ #define DRC_TEST_PROVIDER__H #include -#include +#include #include #include diff --git a/pcbnew/exporters/export_hyperlynx.cpp b/pcbnew/exporters/export_hyperlynx.cpp index b494a8df27..7ff9ff1081 100644 --- a/pcbnew/exporters/export_hyperlynx.cpp +++ b/pcbnew/exporters/export_hyperlynx.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/pcbnew/footprint.h b/pcbnew/footprint.h index c76ac8a2ac..674e950feb 100644 --- a/pcbnew/footprint.h +++ b/pcbnew/footprint.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include // ALL_LAYERS definition. diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 63dff17650..f6cc8c2176 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -191,7 +191,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, wxWindow* aParent m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) ); m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) - .BestSize( -1, m_MsgFrameHeight ) ); + .BestSize( -1, m_msgFrameHeight ) ); m_auimgr.AddPane( m_parametersPanel, EDA_PANE().Palette().Name( "Params" ).Left().Position(0) .Caption( _( "Parameters" ) ).MinSize( 360, 180 ) ); diff --git a/pcbnew/fp_shape.cpp b/pcbnew/fp_shape.cpp index 7ee9619e8c..38aa547d16 100644 --- a/pcbnew/fp_shape.cpp +++ b/pcbnew/fp_shape.cpp @@ -51,7 +51,7 @@ FP_SHAPE::~FP_SHAPE() void FP_SHAPE::SetLocalCoord() { - FOOTPRINT* fp = static_cast( m_Parent ); + FOOTPRINT* fp = static_cast( m_parent ); if( fp == NULL ) { @@ -79,7 +79,7 @@ void FP_SHAPE::SetLocalCoord() void FP_SHAPE::SetDrawCoord() { - FOOTPRINT* fp = static_cast( m_Parent ); + FOOTPRINT* fp = static_cast( m_parent ); m_start = m_Start0; m_end = m_End0; @@ -108,7 +108,7 @@ void FP_SHAPE::SetDrawCoord() std::shared_ptr FP_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const { - FOOTPRINT* fp = static_cast( m_Parent ); + FOOTPRINT* fp = static_cast( m_parent ); std::vector shapes = MakeEffectiveShapes(); for( SHAPE* shape : shapes ) @@ -125,7 +125,7 @@ std::shared_ptr FP_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) { wxString msg; - FOOTPRINT* fp = static_cast( m_Parent ); + FOOTPRINT* fp = static_cast( m_parent ); if( !fp ) return; diff --git a/pcbnew/fp_text.cpp b/pcbnew/fp_text.cpp index b92ed85a22..9910c17316 100644 --- a/pcbnew/fp_text.cpp +++ b/pcbnew/fp_text.cpp @@ -35,7 +35,7 @@ FP_TEXT::FP_TEXT( FOOTPRINT* aParentFootprint, TEXT_TYPE text_type ) : BOARD_ITEM( aParentFootprint, PCB_FP_TEXT_T ), EDA_TEXT() { - FOOTPRINT* parentFootprint = static_cast( m_Parent ); + FOOTPRINT* parentFootprint = static_cast( m_parent ); m_Type = text_type; m_keepUpright = true; @@ -197,7 +197,7 @@ int FP_TEXT::GetLength() const void FP_TEXT::SetDrawCoord() { - const FOOTPRINT* parentFootprint = static_cast( m_Parent ); + const FOOTPRINT* parentFootprint = static_cast( m_parent ); SetTextPos( m_Pos0 ); @@ -216,7 +216,7 @@ void FP_TEXT::SetDrawCoord() void FP_TEXT::SetLocalCoord() { - const FOOTPRINT* parentFootprint = static_cast( m_Parent ); + const FOOTPRINT* parentFootprint = static_cast( m_parent ); if( parentFootprint ) { @@ -246,7 +246,7 @@ const EDA_RECT FP_TEXT::GetBoundingBox() const double FP_TEXT::GetDrawRotation() const { - FOOTPRINT* parentFootprint = static_cast( m_Parent ); + FOOTPRINT* parentFootprint = static_cast( m_parent ); double rotation = GetTextAngle(); if( parentFootprint ) @@ -273,7 +273,7 @@ double FP_TEXT::GetDrawRotation() const // see class_text_mod.h void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) { - FOOTPRINT* parentFootprint = static_cast( m_Parent ); + FOOTPRINT* parentFootprint = static_cast( m_parent ); if( parentFootprint == NULL ) // Happens in modedit, and for new texts return; diff --git a/pcbnew/fp_text.h b/pcbnew/fp_text.h index 1e692e5ee4..7e7689fe66 100644 --- a/pcbnew/fp_text.h +++ b/pcbnew/fp_text.h @@ -26,7 +26,7 @@ #define FP_TEXT_H #include -#include +#include class LINE_READER; class EDA_RECT; diff --git a/pcbnew/kicad_clipboard.h b/pcbnew/kicad_clipboard.h index 76940188d7..ed457d2e05 100644 --- a/pcbnew/kicad_clipboard.h +++ b/pcbnew/kicad_clipboard.h @@ -31,7 +31,7 @@ #define KICAD_CLIPBOARD_H #include -#include +#include #include #include #include diff --git a/pcbnew/microwave/microwave_tool.cpp b/pcbnew/microwave/microwave_tool.cpp index 22ee39bd6c..dc2db8a1ce 100644 --- a/pcbnew/microwave/microwave_tool.cpp +++ b/pcbnew/microwave/microwave_tool.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include diff --git a/pcbnew/netinfo.h b/pcbnew/netinfo.h index bb177292c5..a1867e8d39 100644 --- a/pcbnew/netinfo.h +++ b/pcbnew/netinfo.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index f01c46707e..82722d5267 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -53,7 +53,7 @@ PAD::PAD( FOOTPRINT* parent ) : m_orient = 0; // Pad rotation in 1/10 degrees. m_lengthPadToDie = 0; - if( m_Parent && m_Parent->Type() == PCB_FOOTPRINT_T ) + if( m_parent && m_parent->Type() == PCB_FOOTPRINT_T ) { m_pos = GetParent()->GetPosition(); } @@ -477,7 +477,7 @@ const EDA_RECT PAD::GetBoundingBox() const void PAD::SetDrawCoord() { - FOOTPRINT* parentFootprint = static_cast( m_Parent ); + FOOTPRINT* parentFootprint = static_cast( m_parent ); m_pos = m_pos0; @@ -495,7 +495,7 @@ void PAD::SetDrawCoord() void PAD::SetLocalCoord() { - FOOTPRINT* parentFootprint = static_cast( m_Parent ); + FOOTPRINT* parentFootprint = static_cast( m_parent ); if( parentFootprint == NULL ) { @@ -805,7 +805,7 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& wxString msg, msg2; BOARD* board = GetBoard(); BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); - FOOTPRINT* parentFootprint = static_cast( m_Parent ); + FOOTPRINT* parentFootprint = static_cast( m_parent ); if( parentFootprint ) aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference(), DARKCYAN ); @@ -1240,7 +1240,7 @@ const BOX2I PAD::ViewBBox() const FOOTPRINT* PAD::GetParent() const { - return dynamic_cast( m_Parent ); + return dynamic_cast( m_parent ); } diff --git a/pcbnew/pad.h b/pcbnew/pad.h index 8ad15d0bdc..20f93b4d56 100644 --- a/pcbnew/pad.h +++ b/pcbnew/pad.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/pcbnew/pad_custom_shape_functions.cpp b/pcbnew/pad_custom_shape_functions.cpp index cec120bff7..8f54e819d9 100644 --- a/pcbnew/pad_custom_shape_functions.cpp +++ b/pcbnew/pad_custom_shape_functions.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include #include #include diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 402df2ca8d..809ee313e6 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -634,7 +634,7 @@ void PCB_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) if( cfg ) { m_displayOptions = cfg->m_Display; - m_PolarCoords = cfg->m_PolarCoords; + m_polarCoords = cfg->m_PolarCoords; } wxASSERT( GetCanvas() ); @@ -674,7 +674,7 @@ void PCB_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) if( cfg ) { cfg->m_Display = m_displayOptions; - cfg->m_PolarCoords = m_PolarCoords; + cfg->m_PolarCoords = m_polarCoords; } } diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 45b1eda4e6..6e1838f3c2 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -201,7 +201,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard ) m_view->Add( footprint ); // DRC markers - for( MARKER_PCB* marker : aBoard->Markers() ) + for( PCB_MARKER* marker : aBoard->Markers() ) m_view->Add( marker ); // Finalize the triangulation threads diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 4e10036973..aedbe56c47 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -725,7 +725,7 @@ void PCB_EDIT_FRAME::RecordDRCExclusions() BOARD_DESIGN_SETTINGS& bds = GetBoard()->GetDesignSettings(); bds.m_DrcExclusions.clear(); - for( MARKER_PCB* marker : GetBoard()->Markers() ) + for( PCB_MARKER* marker : GetBoard()->Markers() ) { if( marker->IsExcluded() ) bds.m_DrcExclusions.insert( marker->Serialize() ); @@ -737,12 +737,12 @@ void PCB_EDIT_FRAME::ResolveDRCExclusions() { BOARD_COMMIT commit( this ); - for( MARKER_PCB* marker : GetBoard()->ResolveDRCExclusions() ) + for( PCB_MARKER* marker : GetBoard()->ResolveDRCExclusions() ) commit.Add( marker ); commit.Push( wxEmptyString, false, false ); - for( MARKER_PCB* marker : GetBoard()->Markers() ) + for( PCB_MARKER* marker : GetBoard()->Markers() ) { if( marker->IsExcluded() ) { diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h index 177071b1ee..30fa90d2b9 100644 --- a/pcbnew/pcb_edit_frame.h +++ b/pcbnew/pcb_edit_frame.h @@ -49,7 +49,7 @@ class ZONE; class GENERAL_COLLECTOR; class GENERAL_COLLECTORS_GUIDE; class SELECTION; -class MARKER_PCB; +class PCB_MARKER; class BOARD_ITEM; class PCB_LAYER_BOX_SELECTOR; class NETLIST; diff --git a/pcbnew/pcb_group.cpp b/pcbnew/pcb_group.cpp index ef05681dba..7122f9ebe8 100644 --- a/pcbnew/pcb_group.cpp +++ b/pcbnew/pcb_group.cpp @@ -23,7 +23,7 @@ */ #include #include -#include +#include #include #include #include diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/pcb_marker.cpp similarity index 86% rename from pcbnew/class_marker_pcb.cpp rename to pcbnew/pcb_marker.cpp index 40f4464e38..2c99d33434 100644 --- a/pcbnew/class_marker_pcb.cpp +++ b/pcbnew/pcb_marker.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,7 +42,7 @@ -MARKER_PCB::MARKER_PCB( std::shared_ptr aItem, const wxPoint& aPosition ) : +PCB_MARKER::PCB_MARKER( std::shared_ptr aItem, const wxPoint& aPosition ) : BOARD_ITEM( nullptr, PCB_MARKER_T ), // parent set during BOARD::Add() MARKER_BASE( SCALING_FACTOR, aItem ) { @@ -54,12 +54,12 @@ MARKER_PCB::MARKER_PCB( std::shared_ptr aItem, const wxPoint& aPosition /* destructor */ -MARKER_PCB::~MARKER_PCB() +PCB_MARKER::~PCB_MARKER() { } -wxString MARKER_PCB::Serialize() const +wxString PCB_MARKER::Serialize() const { return wxString::Format( wxT( "%s|%d|%d|%s|%s" ), m_rcItem->GetSettingsKey(), @@ -70,7 +70,7 @@ wxString MARKER_PCB::Serialize() const } -MARKER_PCB* MARKER_PCB::Deserialize( const wxString& data ) +PCB_MARKER* PCB_MARKER::Deserialize( const wxString& data ) { wxArrayString props = wxSplit( data, '|' ); wxPoint markerPos( (int) strtol( props[1].c_str(), nullptr, 10 ), @@ -83,11 +83,11 @@ MARKER_PCB* MARKER_PCB::Deserialize( const wxString& data ) drcItem->SetItems( KIID( props[3] ), KIID( props[4] ) ); - return new MARKER_PCB( drcItem, markerPos ); + return new PCB_MARKER( drcItem, markerPos ); } -void MARKER_PCB::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) +void PCB_MARKER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) { aList.emplace_back( _( "Type" ), _( "Marker" ), DARKCYAN ); aList.emplace_back( _( "Violation" ), m_rcItem->GetErrorMessage(), RED ); @@ -113,13 +113,13 @@ void MARKER_PCB::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vectorGetErrorMessage() could be used instead, but is probably too long // for menu duty. @@ -136,13 +136,13 @@ wxString MARKER_PCB::GetSelectMenuText( EDA_UNITS aUnits ) const } -BITMAP_DEF MARKER_PCB::GetMenuImage() const +BITMAP_DEF PCB_MARKER::GetMenuImage() const { return drc_xpm; } -void MARKER_PCB::ViewGetLayers( int aLayers[], int& aCount ) const +void PCB_MARKER::ViewGetLayers( int aLayers[], int& aCount ) const { aCount = 2; @@ -170,7 +170,7 @@ void MARKER_PCB::ViewGetLayers( int aLayers[], int& aCount ) const } -GAL_LAYER_ID MARKER_PCB::GetColorLayer() const +GAL_LAYER_ID PCB_MARKER::GetColorLayer() const { if( IsExcluded() ) return LAYER_DRC_EXCLUSION; @@ -191,14 +191,14 @@ GAL_LAYER_ID MARKER_PCB::GetColorLayer() const } -KIGFX::COLOR4D MARKER_PCB::getColor() const +KIGFX::COLOR4D PCB_MARKER::getColor() const { COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings(); return colors->GetColor( GetColorLayer() ); } -const EDA_RECT MARKER_PCB::GetBoundingBox() const +const EDA_RECT PCB_MARKER::GetBoundingBox() const { EDA_RECT bbox = m_shapeBoundingBox; @@ -211,7 +211,7 @@ const EDA_RECT MARKER_PCB::GetBoundingBox() const } -const BOX2I MARKER_PCB::ViewBBox() const +const BOX2I PCB_MARKER::ViewBBox() const { EDA_RECT bbox = GetBoundingBox(); return BOX2I( bbox.GetOrigin(), VECTOR2I( bbox.GetWidth(), bbox.GetHeight() ) ); diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/pcb_marker.h similarity index 86% rename from pcbnew/class_marker_pcb.h rename to pcbnew/pcb_marker.h index 2f451becfc..347c99d97b 100644 --- a/pcbnew/class_marker_pcb.h +++ b/pcbnew/pcb_marker.h @@ -22,16 +22,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file class_marker_pcb.h - * @brief Markers used to show a drc problem on boards. - */ - -#ifndef CLASS_MARKER_PCB_H -#define CLASS_MARKER_PCB_H +#ifndef PCB_MARKER_H +#define PCB_MARKER_H -#include +#include #include #include @@ -43,11 +38,11 @@ class DRC_ITEM; class MSG_PANEL_ITEM; -class MARKER_PCB : public BOARD_ITEM, public MARKER_BASE +class PCB_MARKER : public BOARD_ITEM, public MARKER_BASE { public: - MARKER_PCB( std::shared_ptr aItem, const wxPoint& aPosition ); - ~MARKER_PCB(); + PCB_MARKER( std::shared_ptr aItem, const wxPoint& aPosition ); + ~PCB_MARKER(); static inline bool ClassOf( const EDA_ITEM* aItem ) { @@ -58,7 +53,7 @@ public: wxString Serialize() const; - static MARKER_PCB* Deserialize( const wxString& data ); + static PCB_MARKER* Deserialize( const wxString& data ); void Move(const wxPoint& aMoveVector) override { @@ -106,15 +101,15 @@ public: #endif /** Get class name - * @return string "MARKER_PCB" + * @return string "PCB_MARKER" */ virtual wxString GetClass() const override { - return wxT( "MARKER_PCB" ); + return wxT( "PCB_MARKER" ); } protected: KIGFX::COLOR4D getColor() const override; }; -#endif // CLASS_MARKER_PCB_H +#endif // PCB_MARKER_H diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index f0c4122f46..a7c5f73a5d 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -467,7 +467,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; case PCB_MARKER_T: - draw( static_cast( item ), aLayer ); + draw( static_cast( item ), aLayer ); break; default: @@ -1636,7 +1636,7 @@ void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) } -void PCB_PAINTER::draw( const MARKER_PCB* aMarker, int aLayer ) +void PCB_PAINTER::draw( const PCB_MARKER* aMarker, int aLayer ) { bool isShadow = aLayer == LAYER_MARKER_SHADOWS; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 5a0f5ce92e..4c60465380 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -49,7 +49,7 @@ class PCB_TEXT; class FP_TEXT; class DIMENSION_BASE; class PCB_TARGET; -class MARKER_PCB; +class PCB_MARKER; class NET_SETTINGS; class NETINFO_LIST; @@ -293,7 +293,7 @@ protected: void draw( const ZONE* aZone, int aLayer ); void draw( const DIMENSION_BASE* aDimension, int aLayer ); void draw( const PCB_TARGET* aTarget ); - void draw( const MARKER_PCB* aMarker, int aLayer ); + void draw( const PCB_MARKER* aMarker, int aLayer ); /** * Function getLineThickness() diff --git a/pcbnew/pcb_shape.cpp b/pcbnew/pcb_shape.cpp index 35f3345bcb..e718604755 100644 --- a/pcbnew/pcb_shape.cpp +++ b/pcbnew/pcb_shape.cpp @@ -47,7 +47,7 @@ PCB_SHAPE::PCB_SHAPE( BOARD_ITEM* aParent, KICAD_T idtype ) : { m_angle = 0; m_filled = false; - m_Flags = 0; + m_flags = 0; m_shape = S_SEGMENT; m_width = Millimeter2iu( DEFAULT_LINE_WIDTH ); } @@ -456,10 +456,10 @@ void PCB_SHAPE::SetAngle( double aAngle, bool aUpdateEnd ) FOOTPRINT* PCB_SHAPE::GetParentFootprint() const { - if( !m_Parent || m_Parent->Type() != PCB_FOOTPRINT_T ) + if( !m_parent || m_parent->Type() != PCB_FOOTPRINT_T ) return NULL; - return (FOOTPRINT*) m_Parent; + return (FOOTPRINT*) m_parent; } @@ -1223,9 +1223,9 @@ void PCB_SHAPE::SwapData( BOARD_ITEM* aImage ) std::swap( m_bezierPoints, image->m_bezierPoints ); std::swap( m_poly, image->m_poly ); std::swap( m_layer, image->m_layer ); - std::swap( m_Flags, image->m_Flags ); - std::swap( m_Status, image->m_Status ); - std::swap( m_Parent, image->m_Parent ); + std::swap( m_flags, image->m_flags ); + std::swap( m_status, image->m_status ); + std::swap( m_parent, image->m_parent ); std::swap( m_forceVisible, image->m_forceVisible ); } diff --git a/pcbnew/pcb_shape.h b/pcbnew/pcb_shape.h index 7e296f842d..ced23c4bf0 100644 --- a/pcbnew/pcb_shape.h +++ b/pcbnew/pcb_shape.h @@ -25,7 +25,7 @@ #ifndef PCB_SHAPE_H #define PCB_SHAPE_H -#include +#include #include #include #include // for KiROUND diff --git a/pcbnew/pcb_target.h b/pcbnew/pcb_target.h index 6a1207bdee..5d9e10ae31 100644 --- a/pcbnew/pcb_target.h +++ b/pcbnew/pcb_target.h @@ -25,7 +25,7 @@ #ifndef PCB_TARGET_H #define PCB_TARGET_H -#include +#include class EDA_RECT; diff --git a/pcbnew/pcb_text.cpp b/pcbnew/pcb_text.cpp index 2b2ce62203..8f8c47f439 100644 --- a/pcbnew/pcb_text.cpp +++ b/pcbnew/pcb_text.cpp @@ -107,7 +107,7 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector -#include +#include class LINE_READER; diff --git a/pcbnew/pcb_view.h b/pcbnew/pcb_view.h index 2086e8f628..a7701526dd 100644 --- a/pcbnew/pcb_view.h +++ b/pcbnew/pcb_view.h @@ -27,7 +27,7 @@ #include #include -#include +#include class PCB_DISPLAY_OPTIONS; diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 556711f6dd..90bd3adf0c 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -52,7 +52,7 @@ #include // for PCB_PLOT_PARAMS, PCB_PL... #include -#include // for BOARD_ITEM, S_CIRCLE +#include // for BOARD_ITEM, S_CIRCLE #include #include #include diff --git a/pcbnew/plugins/kicad/kicad_plugin.cpp b/pcbnew/plugins/kicad/kicad_plugin.cpp index 972ed86275..6478f7b43f 100644 --- a/pcbnew/plugins/kicad/kicad_plugin.cpp +++ b/pcbnew/plugins/kicad/kicad_plugin.cpp @@ -649,7 +649,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const if( sorted_drawings.size() ) m_out->Print( 0, "\n" ); - // Do not save MARKER_PCBs, they can be regenerated easily. + // Do not save PCB_MARKERs, they can be regenerated easily. // Save the tracks and vias. for( TRACK* track : sorted_tracks ) diff --git a/pcbnew/plugins/kicad/pcb_parser.h b/pcbnew/plugins/kicad/pcb_parser.h index 59e5c62082..7cfc45e668 100644 --- a/pcbnew/plugins/kicad/pcb_parser.h +++ b/pcbnew/plugins/kicad/pcb_parser.h @@ -57,7 +57,7 @@ class PCB_GROUP; class PCB_TARGET; class VIA; class ZONE; -class MARKER_PCB; +class PCB_MARKER; class FP_3DMODEL; struct LAYER; @@ -176,7 +176,7 @@ class PCB_PARSER : public PCB_LEXER VIA* parseVIA(); ZONE* parseZONE( BOARD_ITEM_CONTAINER* aParent ); PCB_TARGET* parsePCB_TARGET(); - MARKER_PCB* parseMARKER( BOARD_ITEM_CONTAINER* aParent ); + PCB_MARKER* parseMARKER( BOARD_ITEM_CONTAINER* aParent ); BOARD* parseBOARD(); void parseGROUP( BOARD_ITEM* aParent ); diff --git a/pcbnew/router/pns_diff_pair_placer.cpp b/pcbnew/router/pns_diff_pair_placer.cpp index fccffabeed..c41dd6b145 100644 --- a/pcbnew/router/pns_diff_pair_placer.cpp +++ b/pcbnew/router/pns_diff_pair_placer.cpp @@ -20,7 +20,7 @@ */ #include -#include +#include #include #include "pns_node.h" diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 736e3a9d00..99f0858b6a 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -31,7 +31,7 @@ #include "pns_utils.h" #include "pns_walkaround.h" -#include +#include #include diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 5770950cc8..9d82f07253 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -23,7 +23,7 @@ #include using namespace std::placeholders; #include -#include +#include #include #include #include diff --git a/pcbnew/swig/board_item.i b/pcbnew/swig/board_item.i index 470d99e14c..143e68818b 100644 --- a/pcbnew/swig/board_item.i +++ b/pcbnew/swig/board_item.i @@ -30,12 +30,12 @@ -%include class_board_item.h // generate code for this interface +%include board_item.h // generate code for this interface %rename(Get) operator BOARD_ITEM*; %{ -#include +#include %} @@ -81,7 +81,7 @@ static FOOTPRINT* Cast_to_FOOTPRINT( BOARD_ITEM* ); static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* ); static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* ); static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* ); -static MARKER_PCB* Cast_to_MARKER_PCB( BOARD_ITEM* ); +static PCB_MARKER* Cast_to_PCB_MARKER( BOARD_ITEM* ); static BOARD* Cast_to_BOARD( BOARD_ITEM* ); static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* ); static PAD* Cast_to_PAD( BOARD_ITEM* ); @@ -106,7 +106,7 @@ static FOOTPRINT* Cast_to_FOOTPRINT( BOARD_ITEM* ); static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* ); static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* ); static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* ); -static MARKER_PCB* Cast_to_MARKER_PCB( BOARD_ITEM* ); +static PCB_MARKER* Cast_to_PCB_MARKER( BOARD_ITEM* ); static BOARD* Cast_to_BOARD( BOARD_ITEM* ); static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* ); static PAD* Cast_to_PAD( BOARD_ITEM* ); @@ -194,7 +194,7 @@ static FOOTPRINT* Cast_to_FOOTPRINT( BOARD_ITEM* self ) { static PCB_GROUP* Cast_to_PCB_GROUP( BOARD_ITEM* self ) { return dynamic_cast(self); } static FP_TEXT* Cast_to_FP_TEXT( BOARD_ITEM* self ) { return dynamic_cast(self); } static PCB_SHAPE* Cast_to_PCB_SHAPE( BOARD_ITEM* self ) { return dynamic_cast(self); } -static MARKER_PCB* Cast_to_MARKER_PCB( BOARD_ITEM* self ) { return dynamic_cast(self); } +static PCB_MARKER* Cast_to_PCB_MARKER( BOARD_ITEM* self ) { return dynamic_cast(self); } static BOARD* Cast_to_BOARD( BOARD_ITEM* self ) { return dynamic_cast(self); } static FP_SHAPE* Cast_to_FP_SHAPE( BOARD_ITEM* self ) { return dynamic_cast(self); } static PAD* Cast_to_PAD( BOARD_ITEM* self ) { return dynamic_cast(self); } diff --git a/pcbnew/swig/marker_pcb.i b/pcbnew/swig/marker_pcb.i index 5f96d32057..bf89b9b745 100644 --- a/pcbnew/swig/marker_pcb.i +++ b/pcbnew/swig/marker_pcb.i @@ -1,6 +1,6 @@ -%include class_marker_pcb.h +%include pcb_marker.h %{ -#include +#include %} diff --git a/pcbnew/swig/pcbnew_scripting_helpers.cpp b/pcbnew/swig/pcbnew_scripting_helpers.cpp index 17ba304696..2a0a7e76c2 100644 --- a/pcbnew/swig/pcbnew_scripting_helpers.cpp +++ b/pcbnew/swig/pcbnew_scripting_helpers.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include @@ -163,7 +163,7 @@ BOARD* LoadBoard( wxString& aFileName, IO_MGR::PCB_FILE_T aFormat ) // Best efforts... } - for( MARKER_PCB* marker : brd->ResolveDRCExclusions() ) + for( PCB_MARKER* marker : brd->ResolveDRCExclusions() ) brd->Add( marker ); brd->BuildConnectivity(); diff --git a/pcbnew/tools/drc_tool.cpp b/pcbnew/tools/drc_tool.cpp index abe1b02fad..d4f471994d 100644 --- a/pcbnew/tools/drc_tool.cpp +++ b/pcbnew/tools/drc_tool.cpp @@ -194,7 +194,7 @@ void DRC_TOOL::RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones } else { - MARKER_PCB* marker = new MARKER_PCB( aItem, aPos ); + PCB_MARKER* marker = new PCB_MARKER( aItem, aPos ); commit.Add( marker ); } } ); diff --git a/pcbnew/tools/drc_tool.h b/pcbnew/tools/drc_tool.h index 6ce4533ddd..d09086bf68 100644 --- a/pcbnew/tools/drc_tool.h +++ b/pcbnew/tools/drc_tool.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/pcbnew/tools/pad_tool.cpp b/pcbnew/tools/pad_tool.cpp index c2c00c37fe..602bdd7773 100644 --- a/pcbnew/tools/pad_tool.cpp +++ b/pcbnew/tools/pad_tool.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index e7d2470e51..5e97090179 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include @@ -449,7 +449,7 @@ int PCB_EDITOR_CONTROL::RepairBoard( const TOOL_EVENT& aEvent ) for( ZONE* zone : board()->Zones() ) processItem( zone ); - for( MARKER_PCB* marker : board()->Markers() ) + for( PCB_MARKER* marker : board()->Markers() ) processItem( marker ); for( PCB_GROUP* group : board()->Groups() ) diff --git a/pcbnew/tools/pcb_selection_conditions.h b/pcbnew/tools/pcb_selection_conditions.h index 6fa52cfc9b..ca590d381b 100644 --- a/pcbnew/tools/pcb_selection_conditions.h +++ b/pcbnew/tools/pcb_selection_conditions.h @@ -27,7 +27,7 @@ #include #include -#include +#include class PCB_SELECTION_CONDITIONS : public SELECTION_CONDITIONS diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 76d7d058c5..b657fe9964 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/pcbnew/tools/pcbnew_selection.cpp b/pcbnew/tools/pcbnew_selection.cpp index 195ee1a554..28f127e051 100644 --- a/pcbnew/tools/pcbnew_selection.cpp +++ b/pcbnew/tools/pcbnew_selection.cpp @@ -30,7 +30,7 @@ using namespace std::placeholders; #include -#include +#include #include #include #include diff --git a/pcbnew/tools/placement_tool.h b/pcbnew/tools/placement_tool.h index 947111025e..cf62b7df79 100644 --- a/pcbnew/tools/placement_tool.h +++ b/pcbnew/tools/placement_tool.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include using ALIGNMENT_RECT = std::pair; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 55f39ea5db..0faf32d8d1 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -29,7 +29,7 @@ using namespace std::placeholders; #include #include -#include +#include #include #include #include diff --git a/pcbnew/track.cpp b/pcbnew/track.cpp index 430ad4827b..614c5a113a 100644 --- a/pcbnew/track.cpp +++ b/pcbnew/track.cpp @@ -738,7 +738,7 @@ void TRACK::GetMsgPanelInfoBase_Common( EDA_DRAW_FRAME* aFrame, std::vector -#include +#include #include #include #include diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index f16e0e36c0..1d2ac62093 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -108,7 +108,7 @@ void ZONE::InitDataFromSrcInCopyCtor( const ZONE& aZone ) // only from a copy constructor. // Copy only useful EDA_ITEM flags: - m_Flags = aZone.m_Flags; + m_flags = aZone.m_flags; m_forceVisible = aZone.m_forceVisible; // Replace the outlines for aZone outlines. diff --git a/pcbnew/zone.h b/pcbnew/zone.h index 972134bb80..8ae251d43e 100644 --- a/pcbnew/zone.h +++ b/pcbnew/zone.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/qa/pcbnew/drc/drc_test_utils.cpp b/qa/pcbnew/drc/drc_test_utils.cpp index ff80dc7329..70965e5289 100644 --- a/qa/pcbnew/drc/drc_test_utils.cpp +++ b/qa/pcbnew/drc/drc_test_utils.cpp @@ -24,10 +24,10 @@ #include "drc_test_utils.h" -std::ostream& operator<<( std::ostream& os, const MARKER_PCB& aMarker ) +std::ostream& operator<<( std::ostream& os, const PCB_MARKER& aMarker ) { const auto& reporter = aMarker.GetRCItem(); - os << "MARKER_PCB[\n"; + os << "PCB_MARKER[\n"; os << " type=" << reporter->GetErrorCode() << " (" << reporter->GetErrorText() << ")" << "\n"; os << "]"; @@ -38,7 +38,7 @@ std::ostream& operator<<( std::ostream& os, const MARKER_PCB& aMarker ) namespace KI_TEST { -bool IsDrcMarkerOfType( const MARKER_PCB& aMarker, int aErrorCode ) +bool IsDrcMarkerOfType( const PCB_MARKER& aMarker, int aErrorCode ) { return aMarker.GetRCItem()->GetErrorCode() == aErrorCode; } diff --git a/qa/pcbnew/drc/drc_test_utils.h b/qa/pcbnew/drc/drc_test_utils.h index 8e1c3428ae..c2e1d875fc 100644 --- a/qa/pcbnew/drc/drc_test_utils.h +++ b/qa/pcbnew/drc/drc_test_utils.h @@ -31,12 +31,12 @@ #include -#include +#include /** - * Define a stream function for logging #MARKER_PCB test assertions. + * Define a stream function for logging #PCB_MARKER test assertions. * - * This has to be in the same namespace as #MARKER_PCB + * This has to be in the same namespace as #PCB_MARKER * * Note: this assumes there is not a operator<< for this type in the main * Pcbnew library. If one is introduced there, this one should be removed. @@ -45,7 +45,7 @@ * will keep testing logging and application-level operator<< implementations * separate, as they should be. */ -std::ostream& operator<<( std::ostream& os, const MARKER_PCB& aMarker ); +std::ostream& operator<<( std::ostream& os, const PCB_MARKER& aMarker ); namespace KI_TEST @@ -56,7 +56,7 @@ namespace KI_TEST * @param aErrorCode the expected DRC violation code * @return true if the marker has this code */ -bool IsDrcMarkerOfType( const MARKER_PCB& aMarker, int aErrorCode ); +bool IsDrcMarkerOfType( const PCB_MARKER& aMarker, int aErrorCode ); } // namespace KI_TEST diff --git a/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp b/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp index 536e367f47..038a4d649b 100644 --- a/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp +++ b/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -227,9 +227,9 @@ std::unique_ptr MakeBoard( const std::vector& /** - * Check if a #MARKER_PCB is described by a particular #COURTYARD_INVALID_INFO object. + * Check if a #PCB_MARKER is described by a particular #COURTYARD_INVALID_INFO object. */ -static bool InvalidMatchesExpected( BOARD& aBoard, const MARKER_PCB& aMarker, +static bool InvalidMatchesExpected( BOARD& aBoard, const PCB_MARKER& aMarker, const COURTYARD_INVALID_INFO& aInvalid ) { auto reporter = std::static_pointer_cast( aMarker.GetRCItem() ); @@ -260,12 +260,12 @@ static bool InvalidMatchesExpected( BOARD& aBoard, const MARKER_PCB& aMarker, * @param aCollisions list of expected collisions */ static void CheckInvalidsMatchExpected( BOARD& aBoard, - const std::vector>& aMarkers, + const std::vector>& aMarkers, const std::vector& aExpInvalids ) { KI_TEST::CheckUnorderedMatches( aExpInvalids, aMarkers, [&]( const COURTYARD_INVALID_INFO& aInvalid, - const std::unique_ptr& aMarker ) + const std::unique_ptr& aMarker ) { return InvalidMatchesExpected( aBoard, *aMarker, aInvalid ); } ); @@ -290,7 +290,7 @@ void DoCourtyardInvalidTest( const COURTYARD_INVALID_CASE& aCase, bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD ] = RPT_SEVERITY_ERROR; // list of markers to collect - std::vector> markers; + std::vector> markers; DRC_ENGINE drcEngine( board.get(), &board->GetDesignSettings() ); @@ -303,7 +303,7 @@ void DoCourtyardInvalidTest( const COURTYARD_INVALID_CASE& aCase, || aItem->GetErrorCode() == DRCE_MALFORMED_COURTYARD || aItem->GetErrorCode() == DRCE_MISSING_COURTYARD ) { - markers.push_back( std::make_unique( aItem, aPos ) ); + markers.push_back( std::make_unique( aItem, aPos ) ); } } ); diff --git a/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp b/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp index 572d0ab52f..33d7501b4a 100644 --- a/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp +++ b/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -382,9 +382,9 @@ static std::vector courtyard_cases = { /** - * Check if a #MARKER_PCB is described by a particular #COURTYARD_COLLISION object. + * Check if a #PCB_MARKER is described by a particular #COURTYARD_COLLISION object. */ -static bool CollisionMatchesExpected( BOARD& aBoard, const MARKER_PCB& aMarker, +static bool CollisionMatchesExpected( BOARD& aBoard, const PCB_MARKER& aMarker, const COURTYARD_COLLISION& aCollision ) { auto reporter = std::static_pointer_cast( aMarker.GetRCItem() ); @@ -415,7 +415,7 @@ static bool CollisionMatchesExpected( BOARD& aBoard, const MARKER_PCB& aMarker, * @param aCollisions list of expected collisions */ static void CheckCollisionsMatchExpected( BOARD& aBoard, - const std::vector>& aMarkers, + const std::vector>& aMarkers, const std::vector& aExpCollisions ) { for( const auto& marker : aMarkers ) @@ -425,7 +425,7 @@ static void CheckCollisionsMatchExpected( BOARD& aBoard, } KI_TEST::CheckUnorderedMatches( aExpCollisions, aMarkers, - [&]( const COURTYARD_COLLISION& aColl, const std::unique_ptr& aMarker ) + [&]( const COURTYARD_COLLISION& aColl, const std::unique_ptr& aMarker ) { return CollisionMatchesExpected( aBoard, *aMarker, aColl ); } ); @@ -452,7 +452,7 @@ static void DoCourtyardOverlapTest( const COURTYARD_OVERLAP_TEST_CASE& aCase, bds.m_DRCSeverities[ DRCE_MISSING_COURTYARD ] = RPT_SEVERITY_IGNORE; // list of markers to collect - std::vector> markers; + std::vector> markers; DRC_ENGINE drcEngine( board.get(), &board->GetDesignSettings() ); @@ -465,7 +465,7 @@ static void DoCourtyardOverlapTest( const COURTYARD_OVERLAP_TEST_CASE& aCase, || aItem->GetErrorCode() == DRCE_MALFORMED_COURTYARD || aItem->GetErrorCode() == DRCE_MISSING_COURTYARD ) { - markers.push_back( std::make_unique( aItem, aPos ) ); + markers.push_back( std::make_unique( aItem, aPos ) ); } } ); diff --git a/qa/pcbnew_tools/tools/pcb_parser/pcb_parser_tool.cpp b/qa/pcbnew_tools/tools/pcb_parser/pcb_parser_tool.cpp index c7df0461d7..fe60d139db 100644 --- a/qa/pcbnew_tools/tools/pcb_parser/pcb_parser_tool.cpp +++ b/qa/pcbnew_tools/tools/pcb_parser/pcb_parser_tool.cpp @@ -31,7 +31,7 @@ #include -#include +#include #include #include #include