Fix minor compil warnings (some are for old compilers).

This commit is contained in:
jean-pierre charras 2017-12-18 14:07:17 +01:00
parent 3c6d17026e
commit 3183fcb4bc
3 changed files with 40 additions and 40 deletions

View File

@ -108,13 +108,13 @@ PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxString& aType, wxPaperSiz
}
PAGE_INFO::PAGE_INFO( const wxString& aType, bool IsPortrait )
PAGE_INFO::PAGE_INFO( const wxString& aType, bool aIsPortrait )
{
SetType( aType, IsPortrait );
SetType( aType, aIsPortrait );
}
bool PAGE_INFO::SetType( const wxString& aType, bool IsPortrait )
bool PAGE_INFO::SetType( const wxString& aType, bool aIsPortrait )
{
bool rc = true;
@ -162,7 +162,7 @@ bool PAGE_INFO::SetType( const wxString& aType, bool IsPortrait )
else
rc = false;
if( IsPortrait )
if( aIsPortrait )
{
// all private PAGE_INFOs are landscape, must swap x and y
m_size = wxSize( m_size.y, m_size.x );
@ -179,14 +179,14 @@ bool PAGE_INFO::IsCustom() const
}
void PAGE_INFO::SetPortrait( bool isPortrait )
void PAGE_INFO::SetPortrait( bool aIsPortrait )
{
if( m_portrait != isPortrait )
if( m_portrait != aIsPortrait )
{
// swap x and y in m_size
m_size = wxSize( m_size.y, m_size.x );
m_portrait = isPortrait;
m_portrait = aIsPortrait;
// margins are not touched, do that if you want
}

View File

@ -84,11 +84,11 @@ public:
* and will be set according to <b>previous</b> calls to
* static PAGE_INFO::SetUserWidthMils() and
* static PAGE_INFO::SetUserHeightMils();
* @param IsPortrait Set to true to set page orientation to portrait mode.
* @param aIsPortrait Set to true to set page orientation to portrait mode.
*
* @return bool - true if @a aStandarePageDescription was a recognized type.
*/
bool SetType( const wxString& aStandardPageDescriptionName, bool IsPortrait = false );
bool SetType( const wxString& aStandardPageDescriptionName, bool aIsPortrait = false );
const wxString& GetType() const { return m_type; }
/**
@ -108,11 +108,11 @@ public:
* will rotate the paper page 90 degrees. This PAGE_INFO may either be in
* portrait or landscape mode. Use this function to change from one to the
* other mode.
* @param isPortrait if true and not already in portrait mode, will change
* @param aIsPortrait if true and not already in portrait mode, will change
* this PAGE_INFO to portrait mode. Or if false and not already in landscape mode,
* will change this PAGE_INFO to landscape mode.
*/
void SetPortrait( bool isPortrait );
void SetPortrait( bool aIsPortrait );
bool IsPortrait() const { return m_portrait; }
/**

View File

@ -596,40 +596,40 @@ void POINT_EDITOR::updatePoints()
case PCB_MODULE_EDGE_T:
{
const DRAWSEGMENT* segment = static_cast<const DRAWSEGMENT*>( item );
switch( segment->GetShape() )
{
switch( segment->GetShape() )
case S_SEGMENT:
m_editPoints->Point( SEG_START ).SetPosition( segment->GetStart() );
m_editPoints->Point( SEG_END ).SetPosition( segment->GetEnd() );
break;
case S_ARC:
m_editPoints->Point( ARC_CENTER ).SetPosition( segment->GetCenter() );
m_editPoints->Point( ARC_START).SetPosition( segment->GetArcStart() );
m_editPoints->Point( ARC_END ).SetPosition( segment->GetArcEnd() );
break;
case S_CIRCLE:
m_editPoints->Point( CIRC_CENTER ).SetPosition( segment->GetCenter() );
m_editPoints->Point( CIRC_END ).SetPosition( segment->GetEnd() );
break;
case S_POLYGON:
{
const auto& points = segment->GetPolyPoints();
for( unsigned i = 0; i < points.size(); i++ )
{
case S_SEGMENT:
m_editPoints->Point( SEG_START ).SetPosition( segment->GetStart() );
m_editPoints->Point( SEG_END ).SetPosition( segment->GetEnd() );
break;
case S_ARC:
m_editPoints->Point( ARC_CENTER ).SetPosition( segment->GetCenter() );
m_editPoints->Point( ARC_START).SetPosition( segment->GetArcStart() );
m_editPoints->Point( ARC_END ).SetPosition( segment->GetArcEnd() );
break;
case S_CIRCLE:
m_editPoints->Point( CIRC_CENTER ).SetPosition( segment->GetCenter() );
m_editPoints->Point( CIRC_END ).SetPosition( segment->GetEnd() );
break;
case S_POLYGON:
{
const auto& points = segment->GetPolyPoints();
for( int i = 0; i < points.size(); i++ )
{
m_editPoints->Point( i ).SetPosition( points[i] );
}
break;
m_editPoints->Point( i ).SetPosition( points[i] );
}
default: // suppress warnings
break;
}
break;
}
default: // suppress warnings
break;
}
break;
}
case PCB_ZONE_AREA_T: