diff --git a/include/eda_rect.h b/include/eda_rect.h index f7fc831638..efe14a9b56 100644 --- a/include/eda_rect.h +++ b/include/eda_rect.h @@ -57,7 +57,7 @@ public: template EDA_RECT( const BOX2 aBox ) { - m_pos = (wxPoint) aBox.GetPosition(); + m_pos = aBox.GetPosition(); m_size.x = aBox.GetWidth(); m_size.y = aBox.GetHeight(); m_init = true; diff --git a/libs/kimath/src/trigo.cpp b/libs/kimath/src/trigo.cpp index 4f333bd276..d720570833 100644 --- a/libs/kimath/src/trigo.cpp +++ b/libs/kimath/src/trigo.cpp @@ -383,7 +383,7 @@ const VECTOR2I CalcArcCenter( const VECTOR2I& aStart, const VECTOR2I& aEnd, doub vec = vec.Resize( r ); vec = vec.Rotate( ( 180.0 - aAngle ) * M_PI / 360.0 ); - return (wxPoint) ( start + vec ); + return (VECTOR2I) ( start + vec ); } diff --git a/pcbnew/connectivity/connectivity_items.cpp b/pcbnew/connectivity/connectivity_items.cpp index 094603d96c..976e36d737 100644 --- a/pcbnew/connectivity/connectivity_items.cpp +++ b/pcbnew/connectivity/connectivity_items.cpp @@ -376,10 +376,10 @@ bool CN_ANCHOR::IsDangling() const { ZONE* zone = static_cast( item->Parent() ); - if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), (wxPoint) Pos(), accuracy ) ) + if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), Pos(), accuracy ) ) connected_count++; } - else if( item->Parent()->HitTest( (wxPoint) Pos(), accuracy ) ) + else if( item->Parent()->HitTest( Pos(), accuracy ) ) { connected_count++; } @@ -402,10 +402,10 @@ int CN_ANCHOR::ConnectedItemsCount() const { ZONE* zone = static_cast( item->Parent() ); - if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), (wxPoint) Pos() ) ) + if( zone->HitTestFilledArea( ToLAYER_ID( item->Layer() ), Pos() ) ) connected_count++; } - else if( item->Parent()->HitTest( (wxPoint) Pos() ) ) + else if( item->Parent()->HitTest( Pos() ) ) { connected_count++; } diff --git a/pcbnew/convert_shape_list_to_polygon.cpp b/pcbnew/convert_shape_list_to_polygon.cpp index 380995ec7c..b6d5a04532 100644 --- a/pcbnew/convert_shape_list_to_polygon.cpp +++ b/pcbnew/convert_shape_list_to_polygon.cpp @@ -347,7 +347,7 @@ bool ConvertOutlineToPolygon( std::vector& aSegList, SHAPE_POLY_SET& else segOwners[ std::make_pair( prevPt, pt ) ] = graphic; - prevPt = (wxPoint) pt; + prevPt = pt; } polygonComplete = true; @@ -583,7 +583,7 @@ bool ConvertOutlineToPolygon( std::vector& aSegList, SHAPE_POLY_SET& else segOwners[ std::make_pair( prevPt, pt ) ] = graphic; - prevPt = (wxPoint) pt; + prevPt = pt; } } else if( graphic->GetShape() == SHAPE_T::CIRCLE ) @@ -809,7 +809,7 @@ bool ConvertOutlineToPolygon( std::vector& aSegList, SHAPE_POLY_SET& BOARD_ITEM* b = fetchOwner( *seg2 ); if( a && b ) - (*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) ( *seg1 ).A ); + (*aErrorHandler)( _( "(self-intersecting)" ), a, b, ( *seg1 ).A ); } selfIntersecting = true; @@ -823,7 +823,7 @@ bool ConvertOutlineToPolygon( std::vector& aSegList, SHAPE_POLY_SET& BOARD_ITEM* b = fetchOwner( *seg2 ); if( a && b ) - (*aErrorHandler)( _( "(self-intersecting)" ), a, b, (wxPoint) pt.get() ); + (*aErrorHandler)( _( "(self-intersecting)" ), a, b, pt.get() ); } selfIntersecting = true; diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp index 5e3937b1a1..8a54b36fd8 100644 --- a/pcbnew/dialogs/dialog_pad_properties.cpp +++ b/pcbnew/dialogs/dialog_pad_properties.cpp @@ -1266,7 +1266,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK() const SEG drillSeg = drillShape->GetSeg(); SHAPE_POLY_SET drillOutline; - TransformOvalToPolygon( drillOutline, (wxPoint) drillSeg.A, (wxPoint) drillSeg.B, + TransformOvalToPolygon( drillOutline, drillSeg.A, drillSeg.B, drillShape->GetWidth(), maxError, ERROR_LOC::ERROR_INSIDE ); drillOutline.BooleanSubtract( padOutline, SHAPE_POLY_SET::POLYGON_MODE::PM_FAST ); diff --git a/pcbnew/drc/drc_test_provider_connectivity.cpp b/pcbnew/drc/drc_test_provider_connectivity.cpp index afb66c61c8..28f07bcf41 100644 --- a/pcbnew/drc/drc_test_provider_connectivity.cpp +++ b/pcbnew/drc/drc_test_provider_connectivity.cpp @@ -162,7 +162,7 @@ bool DRC_TEST_PROVIDER_CONNECTIVITY::Run() std::shared_ptr drcItem = DRC_ITEM::Create( DRCE_UNCONNECTED_ITEMS ); drcItem->SetItems( edge.GetSourceNode()->Parent(), edge.GetTargetNode()->Parent() ); - reportViolation( drcItem, (wxPoint) edge.GetSourceNode()->Pos(), UNDEFINED_LAYER ); + reportViolation( drcItem, edge.GetSourceNode()->Pos(), UNDEFINED_LAYER ); } reportRuleStatistics(); diff --git a/pcbnew/drc/drc_test_provider_copper_clearance.cpp b/pcbnew/drc/drc_test_provider_copper_clearance.cpp index 4c4b085e88..a94aab3085 100644 --- a/pcbnew/drc/drc_test_provider_copper_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_copper_clearance.cpp @@ -291,7 +291,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( PCB_TRACK* track, drcItem->SetItems( track, other ); drcItem->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drcItem, (wxPoint) intersection.get(), layer ); + reportViolation( drcItem, intersection.get(), layer ); return m_drcEngine->GetReportAllTrackErrors(); } @@ -312,7 +312,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( PCB_TRACK* track, drce->SetItems( track, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, layer ); + reportViolation( drce, pos, layer ); if( !m_drcEngine->GetReportAllTrackErrors() ) return false; @@ -360,7 +360,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem( PCB_TRACK* track, drce->SetItems( track, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, layer ); + reportViolation( drce, pos, layer ); if( !m_drcEngine->GetReportAllTrackErrors() ) return false; @@ -446,7 +446,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone( BOARD_ITEM* aItem, drce->SetItems( aItem, aZone ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); } } @@ -492,7 +492,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone( BOARD_ITEM* aItem, drce->SetItems( aItem, aZone ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); } } } @@ -681,7 +681,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa drce->SetItems( pad, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); testHoles = false; // No need for multiple violations } } @@ -713,7 +713,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa drce->SetItems( pad, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); testHoles = false; // No need for multiple violations } } @@ -735,7 +735,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa drce->SetItems( pad, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); testHoles = false; // No need for multiple violations } } @@ -760,7 +760,7 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa drce->SetItems( pad, otherVia ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); } } @@ -931,7 +931,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones() } // Iterate through all the segments of refSmoothedPoly - std::map conflictPoints; + std::map conflictPoints; for( auto refIt = smoothed_polys[ia].IterateSegmentsWithHoles(); refIt; refIt++ ) { @@ -943,7 +943,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones() { // Build test segment SEG testSegment = *testIt; - wxPoint pt; + VECTOR2I pt; int ax1, ay1, ax2, ay2; ax1 = refSegment.A.x; @@ -971,7 +971,7 @@ void DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones() } } - for( const std::pair& conflict : conflictPoints ) + for( const std::pair& conflict : conflictPoints ) { int actual = conflict.second; std::shared_ptr drce; diff --git a/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp b/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp index 080e41d612..f91a9b518a 100644 --- a/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_courtyard_clearance.cpp @@ -217,7 +217,7 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances() } drce->SetItems( fpA, fpB ); - reportViolation( drce, (wxPoint) pos, F_CrtYd ); + reportViolation( drce, pos, F_CrtYd ); } } } @@ -246,7 +246,7 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances() } drce->SetItems( fpA, fpB ); - reportViolation( drce, (wxPoint) pos, B_CrtYd ); + reportViolation( drce, pos, B_CrtYd ); } } } diff --git a/pcbnew/drc/drc_test_provider_edge_clearance.cpp b/pcbnew/drc/drc_test_provider_edge_clearance.cpp index d1847b6a61..7f9e6e2de6 100644 --- a/pcbnew/drc/drc_test_provider_edge_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_edge_clearance.cpp @@ -106,7 +106,7 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::testAgainstEdge( BOARD_ITEM* item, SHAPE* drce->SetItems( edge->m_Uuid, item->m_Uuid ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, Edge_Cuts ); + reportViolation( drce, pos, Edge_Cuts ); return false; // don't report violations with multiple edges; one is enough } } @@ -185,8 +185,8 @@ bool DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run() SEG seg = poly.CSegment( ii ); edges.emplace_back( static_cast( shape->Clone() ) ); edges.back()->SetShape( SHAPE_T::SEGMENT ); - edges.back()->SetStart((wxPoint) seg.A ); - edges.back()->SetEnd((wxPoint) seg.B ); + edges.back()->SetStart( seg.A ); + edges.back()->SetEnd( seg.B ); edges.back()->SetStroke( stroke ); } } diff --git a/pcbnew/drc/drc_test_provider_hole_to_hole.cpp b/pcbnew/drc/drc_test_provider_hole_to_hole.cpp index 4249168be8..bf987133b1 100644 --- a/pcbnew/drc/drc_test_provider_hole_to_hole.cpp +++ b/pcbnew/drc/drc_test_provider_hole_to_hole.cpp @@ -288,7 +288,7 @@ bool DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole( BOARD_ITEM* aItem, SHA { std::shared_ptr drce = DRC_ITEM::Create( DRCE_DRILLED_HOLES_COLOCATED ); drce->SetItems( aItem, aOther ); - reportViolation( drce, (wxPoint) aHole->GetCenter(), UNDEFINED_LAYER ); + reportViolation( drce, aHole->GetCenter(), UNDEFINED_LAYER ); } } else if( reportHole2Hole ) @@ -315,7 +315,7 @@ bool DRC_TEST_PROVIDER_HOLE_TO_HOLE::testHoleAgainstHole( BOARD_ITEM* aItem, SHA drce->SetItems( aItem, aOther ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) aHole->GetCenter(), UNDEFINED_LAYER ); + reportViolation( drce, aHole->GetCenter(), UNDEFINED_LAYER ); } } diff --git a/pcbnew/drc/drc_test_provider_mechanical_clearance.cpp b/pcbnew/drc/drc_test_provider_mechanical_clearance.cpp index 840f04c32c..4963b74e92 100644 --- a/pcbnew/drc/drc_test_provider_mechanical_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_mechanical_clearance.cpp @@ -495,7 +495,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testShapeLineChain( const SHAPE_LIN drce->SetItems( aParentItem ); drce->SetViolatingRule( aConstraint.GetParentRule() ); - reportViolation( drce, (wxPoint) collision.first, aLayer ); + reportViolation( drce, collision.first, aLayer ); } } @@ -542,7 +542,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testZoneLayer( ZONE* aZone, PCB_LAY drce->SetItems( aZone ); drce->SetViolatingRule( aConstraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); } } } @@ -592,7 +592,7 @@ bool DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* it drce->SetItems( item, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, layer ); + reportViolation( drce, pos, layer ); } } @@ -656,7 +656,7 @@ bool DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* it drce->SetItems( item, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, layer ); + reportViolation( drce, pos, layer ); } if( otherHoleShape && otherHoleShape->Collide( itemShape, clearance, &actual, &pos ) ) @@ -672,7 +672,7 @@ bool DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* it drce->SetItems( item, other ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, layer ); + reportViolation( drce, pos, layer ); } } } @@ -761,7 +761,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstZones( BOARD_ITEM* a drce->SetItems( aItem, zone ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); } } @@ -807,7 +807,7 @@ void DRC_TEST_PROVIDER_MECHANICAL_CLEARANCE::testItemAgainstZones( BOARD_ITEM* a drce->SetItems( aItem, zone ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, aLayer ); + reportViolation( drce, pos, aLayer ); } } } diff --git a/pcbnew/drc/drc_test_provider_misc.cpp b/pcbnew/drc/drc_test_provider_misc.cpp index db9754249c..e0c4b130c9 100644 --- a/pcbnew/drc/drc_test_provider_misc.cpp +++ b/pcbnew/drc/drc_test_provider_misc.cpp @@ -114,7 +114,7 @@ void DRC_TEST_PROVIDER_MISC::testOutline() drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS( " " ) + m_msg ); drcItem->SetItems( m_board ); - reportViolation( drcItem, (wxPoint)m_board->GetBoundingBox().Centre(), Edge_Cuts ); + reportViolation( drcItem, m_board->GetBoundingBox().Centre(), Edge_Cuts ); } } } diff --git a/pcbnew/drc/drc_test_provider_silk_clearance.cpp b/pcbnew/drc/drc_test_provider_silk_clearance.cpp index 997a324fc3..ef18e61749 100644 --- a/pcbnew/drc/drc_test_provider_silk_clearance.cpp +++ b/pcbnew/drc/drc_test_provider_silk_clearance.cpp @@ -233,7 +233,7 @@ bool DRC_TEST_PROVIDER_SILK_CLEARANCE::Run() drcItem->SetItems( aRefItem->parent, aTestItem->parent ); drcItem->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drcItem, (wxPoint) pos, aLayers.second ); + reportViolation( drcItem, pos, aLayers.second ); *aCollisionDetected = true; } diff --git a/pcbnew/drc/drc_test_provider_sliver_checker.cpp b/pcbnew/drc/drc_test_provider_sliver_checker.cpp index 9f3b130287..976c9e57ca 100644 --- a/pcbnew/drc/drc_test_provider_sliver_checker.cpp +++ b/pcbnew/drc/drc_test_provider_sliver_checker.cpp @@ -151,7 +151,7 @@ bool DRC_TEST_PROVIDER_SLIVER_CHECKER::Run() { std::shared_ptr drce = DRC_ITEM::Create( DRCE_COPPER_SLIVER ); drce->SetErrorMessage( drce->GetErrorText() + wxS( " " ) + layerDesc( layer ) ); - reportViolation( drce, (wxPoint) pt, layer ); + reportViolation( drce, pt, layer ); } } } diff --git a/pcbnew/drc/drc_test_provider_solder_mask.cpp b/pcbnew/drc/drc_test_provider_solder_mask.cpp index 260340d1d3..d061205105 100644 --- a/pcbnew/drc/drc_test_provider_solder_mask.cpp +++ b/pcbnew/drc/drc_test_provider_solder_mask.cpp @@ -281,7 +281,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testSilkToMaskClearance() drce->SetItems( item ); drce->SetViolatingRule( constraint.GetParentRule() ); - reportViolation( drce, (wxPoint) pos, layer ); + reportViolation( drce, pos, layer ); } } @@ -391,7 +391,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems( BOARD_ITEM* aItem, drce->SetItems( aItem, other ); drce->SetViolatingRule( &m_bridgeRule ); - reportViolation( drce, (wxPoint) pos, aTargetLayer ); + reportViolation( drce, pos, aTargetLayer ); } return true; @@ -456,7 +456,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testMaskItemAgainstZones( BOARD_ITEM* aItem, drce->SetItems( aItem, zone ); drce->SetViolatingRule( &m_bridgeRule ); - reportViolation( drce, (wxPoint) pos, aTargetLayer ); + reportViolation( drce, pos, aTargetLayer ); } } } diff --git a/pcbnew/fp_text.cpp b/pcbnew/fp_text.cpp index 9eebe99844..9ef6f195ba 100644 --- a/pcbnew/fp_text.cpp +++ b/pcbnew/fp_text.cpp @@ -226,7 +226,7 @@ void FP_TEXT::SetLocalCoord() } else { - m_Pos0 = (wxPoint)GetTextPos(); + m_Pos0 = GetTextPos(); } } diff --git a/pcbnew/fp_text.h b/pcbnew/fp_text.h index b27ed57109..eb7c535962 100644 --- a/pcbnew/fp_text.h +++ b/pcbnew/fp_text.h @@ -87,7 +87,7 @@ public: virtual VECTOR2I GetPosition() const override { - return (wxPoint)EDA_TEXT::GetTextPos(); + return EDA_TEXT::GetTextPos(); } virtual void SetPosition( const VECTOR2I& aPos ) override diff --git a/pcbnew/kicad_clipboard.cpp b/pcbnew/kicad_clipboard.cpp index bb6ea673be..39eebd7afd 100644 --- a/pcbnew/kicad_clipboard.cpp +++ b/pcbnew/kicad_clipboard.cpp @@ -154,7 +154,7 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri } // locate the reference point at (0, 0) in the copied items - clone->Move( (wxPoint) -refPoint ); + clone->Move( -refPoint ); // Now delete items, duplicated but not added: for( BOARD_ITEM* skp_item : skipped_items ) @@ -251,7 +251,7 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri prepItem( copy ); // locate the reference point at (0, 0) in the copied items - copy->Move( (wxPoint) -refPoint ); + copy->Move( -refPoint ); Format( copy, 1 ); diff --git a/pcbnew/load_select_footprint.cpp b/pcbnew/load_select_footprint.cpp index 9fb1dc912b..b3db5e1d43 100644 --- a/pcbnew/load_select_footprint.cpp +++ b/pcbnew/load_select_footprint.cpp @@ -516,7 +516,7 @@ void PCB_BASE_FRAME::PlaceFootprint( FOOTPRINT* aFootprint, bool aRecreateRatsne s_PickedList.ClearItemsList(); } - aFootprint->SetPosition((wxPoint) GetCanvas()->GetViewControls()->GetCursorPosition() ); + aFootprint->SetPosition( GetCanvas()->GetViewControls()->GetCursorPosition() ); aFootprint->ClearFlags(); delete s_FootprintInitialCopy; diff --git a/pcbnew/plugins/fabmaster/import_fabmaster.cpp b/pcbnew/plugins/fabmaster/import_fabmaster.cpp index 55180d6b4d..54079e3e0a 100644 --- a/pcbnew/plugins/fabmaster/import_fabmaster.cpp +++ b/pcbnew/plugins/fabmaster/import_fabmaster.cpp @@ -2144,9 +2144,9 @@ bool FABMASTER::loadFootprints( BOARD* aBoard ) FP_SHAPE* arc = new FP_SHAPE( fp, SHAPE_T::ARC ); arc->SetLayer( layer ); - arc->SetArcGeometry( (wxPoint) lsrc->result.GetP0(), - (wxPoint) lsrc->result.GetArcMid(), - (wxPoint) lsrc->result.GetP1() ); + arc->SetArcGeometry( lsrc->result.GetP0(), + lsrc->result.GetArcMid(), + lsrc->result.GetP1() ); arc->SetStroke( STROKE_PARAMS( lsrc->width, PLOT_DASH_TYPE::SOLID ) ); arc->SetLocalCoord(); @@ -2815,9 +2815,9 @@ bool FABMASTER::loadOutline( BOARD* aBoard, const std::unique_ptrSetLayer( layer ); - arc->SetArcGeometry( (wxPoint) src->result.GetP0(), - (wxPoint) src->result.GetArcMid(), - (wxPoint) src->result.GetP1() ); + arc->SetArcGeometry( src->result.GetP0(), + src->result.GetArcMid(), + src->result.GetP1() ); arc->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) ); if( arc->GetWidth() == 0 ) @@ -2944,9 +2944,9 @@ bool FABMASTER::loadGraphics( BOARD* aBoard ) PCB_SHAPE* arc = new PCB_SHAPE( aBoard, SHAPE_T::ARC ); arc->SetLayer( layer ); - arc->SetArcGeometry( (wxPoint) src->result.GetP0(), - (wxPoint) src->result.GetArcMid(), - (wxPoint) src->result.GetP1() ); + arc->SetArcGeometry( src->result.GetP0(), + src->result.GetArcMid(), + src->result.GetP1() ); arc->SetStroke( STROKE_PARAMS( src->width, PLOT_DASH_TYPE::SOLID ) ); aBoard->Add( arc, ADD_MODE::APPEND ); diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index 58a03db1ec..8c9cf68009 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -196,7 +196,7 @@ void BOARD_EDITOR_CONTROL::Reset( RESET_REASON aReason ) if( aReason == MODEL_RELOAD || aReason == GAL_SWITCH ) { - m_placeOrigin->SetPosition( (wxPoint)getModel()->GetDesignSettings().GetAuxOrigin() ); + m_placeOrigin->SetPosition( getModel()->GetDesignSettings().GetAuxOrigin() ); getView()->Remove( m_placeOrigin.get() ); getView()->Add( m_placeOrigin.get() ); } @@ -1529,7 +1529,7 @@ void BOARD_EDITOR_CONTROL::DoSetDrillOrigin( KIGFX::VIEW* aView, PCB_BASE_FRAME* EDA_ITEM* originViewItem, const VECTOR2D& aPosition ) { aFrame->GetDesignSettings().SetAuxOrigin( wxPoint( aPosition ) ); - originViewItem->SetPosition( (wxPoint) aPosition ); + originViewItem->SetPosition( aPosition ); aView->MarkDirty(); aFrame->OnModify(); } diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 7cde92f95d..4f60bc0ec1 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -736,7 +736,7 @@ int BOARD_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent ) DRC_CONSTRAINT constraint; WX_HTML_REPORT_BOX* r = nullptr; - + if( item->Type() == PCB_TRACE_T ) { r = m_inspectConstraintsDialog->AddPage( _( "Track Width" ) ); @@ -963,10 +963,10 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent ) guide.SetPreferredLayer( activeLayer ); GENERAL_COLLECTOR collector; - collector.Collect( board, GENERAL_COLLECTOR::PadsOrTracks, (wxPoint) aPosition, guide ); + collector.Collect( board, GENERAL_COLLECTOR::PadsOrTracks, aPosition, guide ); if( collector.GetCount() == 0 ) - collector.Collect( board, GENERAL_COLLECTOR::Zones, (wxPoint) aPosition, guide ); + collector.Collect( board, GENERAL_COLLECTOR::Zones, aPosition, guide ); // Apply the active selection filter, except we want to allow picking locked items for // highlighting even if the user has disabled them for selection diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 8e9192b704..c504a2f0ea 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -112,7 +112,7 @@ bool EDIT_TOOL::Init() DS_PROXY_VIEW_ITEM* ds = frame()->GetCanvas()->GetDrawingSheet(); VECTOR2D cursor = getViewControls()->GetCursorPosition( false ); - if( ds && ds->HitTestDrawingSheetItems( getView(), (wxPoint) cursor ) ) + if( ds && ds->HitTestDrawingSheetItems( getView(), cursor ) ) return true; } @@ -387,8 +387,8 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent ) if( !retval ) { retval = new PCB_TRACK( theArc->GetParent() ); - retval->SetStart( (wxPoint) aAnchor ); - retval->SetEnd( (wxPoint) aAnchor ); + retval->SetStart( aAnchor ); + retval->SetEnd( aAnchor ); retval->SetNet( theArc->GetNet() ); retval->SetLayer( theArc->GetLayer() ); retval->SetWidth( theArc->GetWidth() ); @@ -543,19 +543,19 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent ) VECTOR2I newMid = CalcArcMid( newStart, newEnd, newCenter ); // Update objects - theArc->SetStart( (wxPoint) newStart ); - theArc->SetEnd( (wxPoint) newEnd ); - theArc->SetMid( (wxPoint) newMid ); + theArc->SetStart( newStart ); + theArc->SetEnd( newEnd ); + theArc->SetMid( newMid ); if( isStartTrackOnStartPt ) - trackOnStart->SetStart( (wxPoint) newStart ); + trackOnStart->SetStart( newStart ); else - trackOnStart->SetEnd( (wxPoint) newStart ); + trackOnStart->SetEnd( newStart ); if( isEndTrackOnStartPt ) - trackOnEnd->SetStart( (wxPoint) newEnd ); + trackOnEnd->SetStart( newEnd ); else - trackOnEnd->SetEnd( (wxPoint) newEnd ); + trackOnEnd->SetEnd( newEnd ); // Update view getView()->Update( trackOnStart ); @@ -1380,7 +1380,7 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) DS_PROXY_VIEW_ITEM* ds = editFrame->GetCanvas()->GetDrawingSheet(); VECTOR2D cursorPos = getViewControls()->GetCursorPosition( false ); - if( ds && ds->HitTestDrawingSheetItems( getView(), (wxPoint) cursorPos ) ) + if( ds && ds->HitTestDrawingSheetItems( getView(), cursorPos ) ) m_toolMgr->RunAction( ACTIONS::pageSettings ); else m_toolMgr->RunAction( PCB_ACTIONS::footprintProperties, true ); @@ -2030,7 +2030,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent ) item->Rotate( selCenter, rotation ); break; case ROTATE_AROUND_USER_ORIGIN: - item->Rotate( (wxPoint) frame()->GetScreen()->m_LocalOrigin, rotation ); + item->Rotate( frame()->GetScreen()->m_LocalOrigin, rotation ); break; case ROTATE_AROUND_AUX_ORIGIN: item->Rotate( board()->GetDesignSettings().GetAuxOrigin(), rotation ); diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index a622bcba76..03d4f64aa8 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -309,9 +309,9 @@ bool ZONE::IsOnLayer( PCB_LAYER_ID aLayer ) const const EDA_RECT ZONE::GetBoundingBox() const { - auto bb = m_Poly->BBox(); + BOX2I bb = m_Poly->BBox(); - EDA_RECT ret( (wxPoint) bb.GetOrigin(), wxSize( bb.GetWidth(), bb.GetHeight() ) ); + EDA_RECT ret( bb.GetOrigin(), VECTOR2I( bb.GetWidth(), bb.GetHeight() ) ); return ret; } diff --git a/qa/common/test_array_options.cpp b/qa/common/test_array_options.cpp index 3ad0eee1da..fb663c59bc 100644 --- a/qa/common/test_array_options.cpp +++ b/qa/common/test_array_options.cpp @@ -267,8 +267,8 @@ BOOST_AUTO_TEST_CASE( GridGeometry ) grid_opts.m_nx = c.m_geom.m_nx; grid_opts.m_ny = c.m_geom.m_ny; - grid_opts.m_delta = (wxPoint) c.m_geom.m_delta; - grid_opts.m_offset = (wxPoint) c.m_geom.m_offset; + grid_opts.m_delta = c.m_geom.m_delta; + grid_opts.m_offset = c.m_geom.m_offset; grid_opts.m_stagger = c.m_geom.m_stagger; grid_opts.m_stagger_rows = c.m_geom.m_stagger_by_row; grid_opts.m_reverseNumberingAlternate = c.m_geom.m_alternate_numbers; diff --git a/qa/eeschema/test_ee_item.cpp b/qa/eeschema/test_ee_item.cpp index 0260819646..6da241812c 100644 --- a/qa/eeschema/test_ee_item.cpp +++ b/qa/eeschema/test_ee_item.cpp @@ -213,18 +213,18 @@ BOOST_AUTO_TEST_CASE( Rotate ) if( schItem != nullptr ) { // Only rotating pins around the center of parent sheet works. - schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); - schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); - schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); - schItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); + schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); + schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); + schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); + schItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); } if( libItem != nullptr ) { - libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); - libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); - libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); - libItem->Rotate( (wxPoint) m_sheet.GetBodyBoundingBox().GetCenter() ); + libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); + libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); + libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); + libItem->Rotate( m_sheet.GetBodyBoundingBox().GetCenter() ); } CompareItems( newItem.get(), item.get() ); diff --git a/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp b/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp index 5f54fbb270..bd07fda238 100644 --- a/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp +++ b/qa/pcbnew/drc/test_drc_courtyard_invalid.cpp @@ -206,7 +206,7 @@ std::unique_ptr MakeInvalidCourtyardTestFP( BOARD& aBoard, // As of 2019-01-17, this has to go after adding the courtyards, // or all the poly sets are empty when DRC'd - footprint->SetPosition( (wxPoint) aFPDef.m_pos ); + footprint->SetPosition( aFPDef.m_pos ); return footprint; } diff --git a/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp b/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp index 611f95458a..cffcf4b598 100644 --- a/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp +++ b/qa/pcbnew/drc/test_drc_courtyard_overlap.cpp @@ -117,7 +117,7 @@ std::unique_ptr MakeCourtyardTestFP( BOARD& aBoard, const COURTYARD_T footprint->SetReference( aFPDef.m_refdes ); // This has to go after adding the courtyards, or all the poly sets are empty when DRC'd - footprint->SetPosition( (wxPoint) aFPDef.m_pos ); + footprint->SetPosition( aFPDef.m_pos ); return footprint; } diff --git a/qa/pcbnew_utils/board_construction_utils.cpp b/qa/pcbnew_utils/board_construction_utils.cpp index a601740800..40f479dbce 100644 --- a/qa/pcbnew_utils/board_construction_utils.cpp +++ b/qa/pcbnew_utils/board_construction_utils.cpp @@ -36,8 +36,8 @@ void DrawSegment( FOOTPRINT& aFootprint, const SEG& aSeg, int aWidth, PCB_LAYER_ { std::unique_ptr seg = std::make_unique( &aFootprint, SHAPE_T::SEGMENT ); - seg->SetStart0( (wxPoint) aSeg.A ); - seg->SetEnd0( (wxPoint) aSeg.B ); + seg->SetStart0( aSeg.A ); + seg->SetEnd0( aSeg.B ); seg->SetStroke( STROKE_PARAMS( aWidth, PLOT_DASH_TYPE::SOLID ) ); seg->SetLayer( aLayer ); @@ -61,8 +61,8 @@ void DrawArc( FOOTPRINT& aFootprint, const VECTOR2I& aCentre, const VECTOR2I& aS { std::unique_ptr arc = std::make_unique( &aFootprint, SHAPE_T::ARC ); - arc->SetCenter0( (wxPoint) aCentre ); - arc->SetStart0( (wxPoint) aStart ); + arc->SetCenter0( aCentre ); + arc->SetStart0( aStart ); arc->SetArcAngleAndEnd0( aAngle * 10 ); arc->SetStroke( STROKE_PARAMS( aWidth, PLOT_DASH_TYPE::SOLID ) );