Fix a few missing override qualifiers and shadowed vars.

This commit is contained in:
jean-pierre charras 2016-09-27 10:58:05 +02:00
parent f2462925ec
commit 673b094b2b
3 changed files with 35 additions and 38 deletions

View File

@ -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 );
}

View File

@ -66,7 +66,7 @@ public:
mpInfoLayer::Move( aDelta );
}
void UpdateReference();
void UpdateReference() override;
const wxRealPoint& GetCoords() const
{

View File

@ -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; ndx<reportedLayers; ++ndx )
{
@ -580,7 +580,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
shape = new SHAPE( padstack );
padstack->Append( 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 ) );
}