diff --git a/common/tool/edit_constraints.cpp b/common/tool/edit_constraints.cpp index 49dfaf9241..83564f1d23 100644 --- a/common/tool/edit_constraints.cpp +++ b/common/tool/edit_constraints.cpp @@ -146,11 +146,11 @@ void EC_CIRCLE::Apply( EDIT_POINT& aHandle, const GRID_HELPER& aGrid ) EC_CONVERGING::EC_CONVERGING( EDIT_LINE& aLine, EDIT_POINTS& aPoints ) : - EDIT_CONSTRAINT( aLine ), - m_colinearConstraint( nullptr ), - m_prevOrigin( aPoints.Previous( aLine.GetOrigin(), false ) ), - m_nextEnd( aPoints.Next( aLine.GetEnd(), false ) ), - m_editPoints( aPoints ) + EDIT_CONSTRAINT( aLine ), + m_colinearConstraint( nullptr ), + m_prevOrigin( aPoints.Previous( aLine.GetOrigin(), false ) ), + m_editPoints( aPoints ), + m_nextEnd( aPoints.Next( aLine.GetEnd(), false ) ) { // Dragged segment endings EDIT_POINT& origin = aLine.GetOrigin(); diff --git a/eeschema/dialogs/dialog_shape_properties.cpp b/eeschema/dialogs/dialog_shape_properties.cpp index 112a86602d..e0cbe272cb 100644 --- a/eeschema/dialogs/dialog_shape_properties.cpp +++ b/eeschema/dialogs/dialog_shape_properties.cpp @@ -150,7 +150,7 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataToWindow() else wxFAIL_MSG( wxT( "Line type not found in the type lookup map" ) ); - if( SYMBOL_EDIT_FRAME* symbolEditor = dynamic_cast( m_frame ) ) + if( dynamic_cast( m_frame ) ) { m_rbFillNone->Enable( true ); m_rbFillOutline->Enable( true ); diff --git a/include/tool/edit_table_tool_base.h b/include/tool/edit_table_tool_base.h index c0794be40d..3c5ce7d26b 100644 --- a/include/tool/edit_table_tool_base.h +++ b/include/tool/edit_table_tool_base.h @@ -48,48 +48,46 @@ protected: && SELECTION_CONDITIONS::OnlyTypes( { SCH_TABLECELL_T, PCB_TABLECELL_T } ); - auto cellBlockSelection = - [this]( const SELECTION& sel ) + auto cellBlockSelection = []( const SELECTION& sel ) + { + if( sel.Size() < 2 ) + return false; + + int colMin = std::numeric_limits::max(); + int colMax = 0; + int rowMin = std::numeric_limits::max(); + int rowMax = 0; + int selectedArea = 0; + + for( EDA_ITEM* item : sel ) + { + if( T_TABLECELL* cell = dynamic_cast( item ) ) { - if( sel.Size() < 2 ) - return false; + colMin = std::min( colMin, cell->GetColumn() ); + colMax = std::max( colMax, cell->GetColumn() + cell->GetColSpan() ); + rowMin = std::min( rowMin, cell->GetRow() ); + rowMax = std::max( rowMax, cell->GetRow() + cell->GetRowSpan() ); - int colMin = std::numeric_limits::max(); - int colMax = 0; - int rowMin = std::numeric_limits::max(); - int rowMax = 0; - int selectedArea = 0; + selectedArea += cell->GetColSpan() * cell->GetRowSpan(); + } + } - for( EDA_ITEM* item : sel ) - { - if( T_TABLECELL* cell = dynamic_cast( item ) ) - { - colMin = std::min( colMin, cell->GetColumn() ); - colMax = std::max( colMax, cell->GetColumn() + cell->GetColSpan() ); - rowMin = std::min( rowMin, cell->GetRow() ); - rowMax = std::max( rowMax, cell->GetRow() + cell->GetRowSpan() ); + return selectedArea == ( colMax - colMin ) * ( rowMax - rowMin ); + }; - selectedArea += cell->GetColSpan() * cell->GetRowSpan(); - } - } - - return selectedArea == ( colMax - colMin ) * ( rowMax - rowMin ); - }; - - auto mergedCellsSelection = - [this]( const SELECTION& sel ) + auto mergedCellsSelection = []( const SELECTION& sel ) + { + for( EDA_ITEM* item : sel ) + { + if( T_TABLECELL* cell = dynamic_cast( item ) ) { - for( EDA_ITEM* item : sel ) - { - if( T_TABLECELL* cell = dynamic_cast( item ) ) - { - if( cell->GetColSpan() > 1 || cell->GetRowSpan() > 1 ) - return true; - } - } + if( cell->GetColSpan() > 1 || cell->GetRowSpan() > 1 ) + return true; + } + } - return false; - }; + return false; + }; // // Add editing actions to the selection tool menu diff --git a/pcbnew/specctra_import_export/specctra_import.cpp b/pcbnew/specctra_import_export/specctra_import.cpp index 5d078b84a1..5ca3534029 100644 --- a/pcbnew/specctra_import_export/specctra_import.cpp +++ b/pcbnew/specctra_import_export/specctra_import.cpp @@ -231,8 +231,8 @@ PCB_VIA* SPECCTRA_DB::makeVIA( WIRE_VIA* aVia, PADSTACK* aPadstack, const POINT& drillEndNdx-drillStartNdx ); double drill_um{}; - auto res = fast_float::from_chars( diam_txt.data(), diam_txt.data() + diam_txt.size(), drill_um, - fast_float::chars_format::skip_white_space ); + fast_float::from_chars( diam_txt.data(), diam_txt.data() + diam_txt.size(), drill_um, + fast_float::chars_format::skip_white_space ); drill_diam_iu = static_cast( drill_um * ( pcbIUScale.IU_PER_MM / 1000.0 ) );