From 673b094b2b915d55d31d2d8583adc664f5bb51eb Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 27 Sep 2016 10:58:05 +0200 Subject: [PATCH] Fix a few missing override qualifiers and shadowed vars. --- eeschema/sim/sim_plot_panel.cpp | 16 +++++----- eeschema/sim/sim_plot_panel.h | 2 +- pcbnew/specctra_export.cpp | 55 ++++++++++++++++----------------- 3 files changed, 35 insertions(+), 38 deletions(-) diff --git a/eeschema/sim/sim_plot_panel.cpp b/eeschema/sim/sim_plot_panel.cpp index 9b6698a263..964358f03d 100644 --- a/eeschema/sim/sim_plot_panel.cpp +++ b/eeschema/sim/sim_plot_panel.cpp @@ -151,7 +151,7 @@ public: FREQUENCY_LOG_SCALE( wxString name, int flags ) : mpScaleXLog( name, flags ) {}; - void formatLabels() + void formatLabels() override { const wxString unit = wxT( "Hz" ); wxString suffix; @@ -176,7 +176,7 @@ public: FREQUENCY_LIN_SCALE( wxString name, int flags ) : mpScaleX( name, flags, false , 0 ) {}; - void formatLabels() + void formatLabels() override { formatSILabels( this, wxT( "Hz" ), 3 ); } @@ -189,7 +189,7 @@ public: TIME_SCALE( wxString name, int flags ) : mpScaleX( name, flags, false, 0 ) {}; - void formatLabels() + void formatLabels() override { formatSILabels( this, wxT( "s" ), 3 ); } @@ -202,7 +202,7 @@ public: VOLTAGE_SCALE_X( wxString name, int flags ) : mpScaleX( name, flags, false, 0 ) {}; - void formatLabels() + void formatLabels() override { formatSILabels( this, wxT( "V" ), 3 ); } @@ -215,7 +215,7 @@ public: GAIN_SCALE( wxString name, int flags ) : mpScaleY( name, flags, false ) {}; - void formatLabels() + void formatLabels() override { formatSILabels( this, wxT( "dB" ), 3 ); } @@ -229,7 +229,7 @@ public: PHASE_SCALE( wxString name, int flags ) : mpScaleY( name, flags, false ) {}; - void formatLabels() + void formatLabels() override { formatSILabels( this, wxT( "\u00B0" ), 3 ); // degree sign } @@ -242,7 +242,7 @@ public: VOLTAGE_SCALE_Y( wxString name, int flags ) : mpScaleY( name, flags, false ) {}; - void formatLabels() + void formatLabels() override { formatSILabels( this, wxT( "V" ), 3 ); } @@ -255,7 +255,7 @@ public: CURRENT_SCALE( wxString name, int flags ) : mpScaleY( name, flags, false ) {}; - void formatLabels() + void formatLabels() override { formatSILabels( this, wxT( "A" ), 3 ); } diff --git a/eeschema/sim/sim_plot_panel.h b/eeschema/sim/sim_plot_panel.h index 0b72eed588..432d27841a 100644 --- a/eeschema/sim/sim_plot_panel.h +++ b/eeschema/sim/sim_plot_panel.h @@ -66,7 +66,7 @@ public: mpInfoLayer::Move( aDelta ); } - void UpdateReference(); + void UpdateReference() override; const wxRealPoint& GetCoords() const { diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 6df8c626c0..dd1f83b80c 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -550,27 +550,27 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) double dy = scale( aPad->GetSize().y ) / 2.0; double dr = dx - dy; double radius; - POINT start; - POINT stop; + POINT pstart; + POINT pstop; if( dr >= 0 ) // oval is horizontal { radius = dy; - start = POINT( -dr, 0.0 ); - stop = POINT( dr, 0.0 ); + pstart = POINT( -dr, 0.0 ); + pstop = POINT( dr, 0.0 ); } else // oval is vertical { radius = dx; dr = -dr; - start = POINT( 0.0, -dr ); - stop = POINT( 0.0, dr ); + pstart = POINT( 0.0, -dr ); + pstop = POINT( 0.0, dr ); } - start += dsnOffset; - stop += dsnOffset; + pstart += dsnOffset; + pstop += dsnOffset; for( int ndx=0; ndxAppend( shape ); - path = makePath( start, stop, layerName[ndx] ); + path = makePath( pstart, pstop, layerName[ndx] ); shape->SetShape( path ); path->aperture_width = 2.0 * radius; } @@ -982,7 +982,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) // an arc with a series of short lines and put those // line segments into the !same! PATH. { - wxPoint start = graphic->GetArcStart(); + wxPoint pstart = graphic->GetArcStart(); wxPoint center = graphic->GetCenter(); double angle = -graphic->GetAngle(); int steps = STEPS * fabs(angle) /3600.0; @@ -996,9 +996,9 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) { double rotation = ( angle * step ) / steps; - pt = start; + pt = pstart; - RotatePoint( &pt.x, &pt.y, center.x, center.y, rotation ); + RotatePoint( &pt, center, rotation ); if( pt.x < xmin.x ) { @@ -1098,21 +1098,21 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) // an arc with a series of short lines and put those // line segments into the !same! PATH. { - wxPoint start = graphic->GetArcStart(); - wxPoint end = graphic->GetArcEnd(); - wxPoint center = graphic->GetCenter(); + wxPoint pstart = graphic->GetArcStart(); + wxPoint pend = graphic->GetArcEnd(); + wxPoint pcenter = graphic->GetCenter(); double angle = -graphic->GetAngle(); int steps = STEPS * fabs(angle) /3600.0; if( steps == 0 ) steps = 1; - if( !close_enough( prevPt, start, prox ) ) + if( !close_enough( prevPt, pstart, prox ) ) { wxASSERT( close_enough( prevPt, graphic->GetArcEnd(), prox ) ); angle = -angle; - std::swap( start, end ); + std::swap( pstart, pend ); } wxPoint nextPt; @@ -1120,10 +1120,8 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) for( int step = 1; step<=steps; ++step ) { double rotation = ( angle * step ) / steps; - - nextPt = start; - - RotatePoint( &nextPt.x, &nextPt.y, center.x, center.y, rotation ); + nextPt = pstart; + RotatePoint( &nextPt, pcenter, rotation ); path->AppendPoint( mapPt( nextPt ) ); } @@ -1233,21 +1231,21 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) // an arc with a series of short lines and put those // line segments into the !same! PATH. { - wxPoint start = graphic->GetArcStart(); - wxPoint end = graphic->GetArcEnd(); - wxPoint center = graphic->GetCenter(); + wxPoint pstart = graphic->GetArcStart(); + wxPoint pend = graphic->GetArcEnd(); + wxPoint pcenter = graphic->GetCenter(); double angle = -graphic->GetAngle(); int steps = STEPS * fabs(angle) /3600.0; if( steps == 0 ) steps = 1; - if( !close_enough( prevPt, start, prox ) ) + if( !close_enough( prevPt, pstart, prox ) ) { wxASSERT( close_enough( prevPt, graphic->GetArcEnd(), prox ) ); angle = -angle; - std::swap( start, end ); + std::swap( pstart, pend ); } wxPoint nextPt; @@ -1256,9 +1254,8 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) { double rotation = ( angle * step ) / steps; - nextPt = start; - - RotatePoint( &nextPt.x, &nextPt.y, center.x, center.y, rotation ); + nextPt = pstart; + RotatePoint( &nextPt, pcenter, rotation ); poly_ko->AppendPoint( mapPt( nextPt ) ); }