From 4ffea8aae457fe2036f54cd260cb5e64b59afc3c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 21 Jan 2022 14:10:26 +0100 Subject: [PATCH] code cleaning. --- common/plotters/GERBER_plotter.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 46a34ea48d..71edaa6dd2 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -1345,15 +1345,12 @@ void GERBER_PLOTTER::FlashPadRect( const VECTOR2I& pos, const VECTOR2I& aSize, VECTOR2I size( aSize ); GBR_METADATA* gbr_metadata = static_cast( aData ); - EDA_ANGLE orient( aOrient ); - orient.Normalize(); // Horizontal / vertical rect can use a basic aperture (not a macro) // so use it for rotation n*90 deg - // if( aOrient.IsCardinal() ) - if( orient == ANGLE_0 || orient == ANGLE_90 || orient == ANGLE_180 || orient == ANGLE_270 ) + if( aOrient.IsCardinal() ) { - if( orient == ANGLE_90 || orient == ANGLE_270 ) + if( aOrient.IsCardinal90() ) // Build the not rotated equivalent shape: std::swap( size.x, size.y );