Fixed a few warnings (mostly gcc6 -Wmisleading-indent).

This commit is contained in:
Maciej Suminski 2016-06-07 14:42:42 +02:00
parent 3fcae6b120
commit 71aade6b51
7 changed files with 326 additions and 301 deletions

View File

@ -230,11 +230,10 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet(
if( outline->GetLayer() != aLayer )
break;
outline->TransformShapeWithClearanceToPolygon( aCornerBuffer,
0,
aCircleToSegmentsCount,
aCorrectionFactor );
break;
outline->TransformShapeWithClearanceToPolygon( aCornerBuffer, 0,
aCircleToSegmentsCount, aCorrectionFactor );
break;
default:
break;

View File

@ -677,7 +677,7 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
if( m_deleteSinglePadNets )
deleteSinglePadNets();
if ( !m_isDryRun )
if ( !m_isDryRun )
{
m_frame->SaveCopyInUndoList( *m_undoList, UR_UNSPECIFIED, wxPoint(0, 0) );
m_frame->OnModify();

View File

@ -1385,8 +1385,8 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, double aMMt
export_vrml_module( model3d, pcb, module, output_file, wrml_3D_models_scaling_factor,
aExport3DFiles, aUseRelativePaths, a3D_Subdir );
// write out the board and all layers
write_layers( model3d, output_file, pcb );
// write out the board and all layers
write_layers( model3d, output_file, pcb );
// Close the outer 'transform' node
output_file << "]\n}\n";

View File

@ -3677,7 +3677,7 @@ void Clipper::FixupFirstLefts3(OutRec* OldOutRec, OutRec* NewOutRec)
for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
{
OutRec* outRec = m_PolyOuts[i];
OutRec* firstLeft = ParseFirstLeft(outRec->FirstLeft);
//OutRec* firstLeft = ParseFirstLeft(outRec->FirstLeft);
if (outRec->Pts && outRec->FirstLeft == OldOutRec)
outRec->FirstLeft = NewOutRec;
}

View File

@ -501,22 +501,22 @@ bool IDF_DRILL_DATA::read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit,
"invalid IDFv3 file\n"
"* Violation of specification: missing PLATING for drilled hole" ) );
if( CompareToken( "PTH", token ) )
{
plating = IDF3::PTH;
}
else if( CompareToken( "NPTH", token ) )
{
plating = IDF3::NPTH;
}
else
{
ostringstream ostr;
ostr << "invalid IDFv3 file\n";
ostr << "* Violation of specification: invalid PLATING type ('" << token << "')";
if( CompareToken( "PTH", token ) )
{
plating = IDF3::PTH;
}
else if( CompareToken( "NPTH", token ) )
{
plating = IDF3::NPTH;
}
else
{
ostringstream ostr;
ostr << "invalid IDFv3 file\n";
ostr << "* Violation of specification: invalid PLATING type ('" << token << "')";
throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) );
}
throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) );
}
}
else
{
@ -614,14 +614,14 @@ bool IDF_DRILL_DATA::read( std::ifstream& aBoardFile, IDF3::IDF_UNIT aBoardUnit,
"invalid IDFv3 file\n"
"* Violation of specification: missing OWNER for drilled hole" ) );
if( !ParseOwner( token, owner ) )
{
ostringstream ostr;
ostr << "invalid IDFv3 file\n";
ostr << "* Violation of specification: invalid OWNER for drilled hole ('" << token << "')";
if( !ParseOwner( token, owner ) )
{
ostringstream ostr;
ostr << "invalid IDFv3 file\n";
ostr << "* Violation of specification: invalid OWNER for drilled hole ('" << token << "')";
throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) );
}
throw( IDF_ERROR( __FILE__, __FUNCTION__, __LINE__, ostr.str() ) );
}
}
else
{
@ -1225,8 +1225,8 @@ void IDF_SEGMENT::SwapEnds( void )
if( ( angle < MIN_ANG ) && ( angle > -MIN_ANG ) )
return; // nothing more to do
// change the direction of the arc
angle = -angle;
// change the direction of the arc
angle = -angle;
// calculate the new offset angle
offsetAngle = IDF3::CalcAngleDeg( center, startPoint );
}

View File

@ -50,7 +50,7 @@ static inline wxString FROM_UTF8( const char* cstring )
if( line.IsEmpty() ) // happens when cstring is not a valid UTF8 sequence
line = wxConvCurrent->cMB2WC( cstring ); // try to use locale conversion
return line;
return line;
}