Fix some Coverity and compil warnings.
This commit is contained in:
parent
5fc860b357
commit
f51db4e093
|
@ -680,7 +680,6 @@ target_link_libraries( pcbnew_kiface_objects
|
|||
nlohmann_json
|
||||
rectpack2d
|
||||
gzip-hpp
|
||||
${EXTRA_LIB}
|
||||
${ZLIB_LIBRARIES}
|
||||
${OCC_LIBRARIES}
|
||||
)
|
||||
|
|
|
@ -199,6 +199,7 @@ STEP_PCB_MODEL::STEP_PCB_MODEL( const wxString& aPcbName )
|
|||
m_minx = 1.0e10; // absurdly large number; any valid PCB X value will be smaller
|
||||
m_pcbName = aPcbName;
|
||||
BRepBuilderAPI::Precision( STEPEXPORT_MIN_DISTANCE );
|
||||
m_maxError = 5000; // 5 microns
|
||||
}
|
||||
|
||||
|
||||
|
@ -457,7 +458,7 @@ bool STEP_PCB_MODEL::CreatePCB( SHAPE_POLY_SET& aOutline, VECTOR2D aOrigin )
|
|||
Cut.SetArguments( mainbrd );
|
||||
TopTools_ListOfShape holelist;
|
||||
|
||||
for( auto hole : m_cutouts )
|
||||
for( TopoDS_Shape& hole : m_cutouts )
|
||||
holelist.Append( hole );
|
||||
|
||||
Cut.SetTools( holelist );
|
||||
|
|
|
@ -440,7 +440,7 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
|||
{
|
||||
m_commit.Modified( aPcbFootprint, copy );
|
||||
}
|
||||
else
|
||||
else if( copy )
|
||||
{
|
||||
copy->SetParentGroup( nullptr );
|
||||
delete copy;
|
||||
|
@ -629,7 +629,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( FOOTPRINT* aFootprint
|
|||
{
|
||||
m_commit.Modified( aFootprint, copy );
|
||||
}
|
||||
else
|
||||
else if( copy )
|
||||
{
|
||||
copy->SetParentGroup( nullptr );
|
||||
delete copy;
|
||||
|
|
|
@ -344,7 +344,7 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent )
|
|||
auto updateStatusPopup =
|
||||
[&]( EDA_ITEM* item, size_t ii, size_t count )
|
||||
{
|
||||
wxString status = _( "Click to place %s (item %ld of %ld)\n"
|
||||
wxString popuptext = _( "Click to place %s (item %ld of %ld)\n"
|
||||
"Press <esc> to cancel all; double-click to finish" );
|
||||
wxString msg;
|
||||
|
||||
|
@ -364,7 +364,7 @@ int EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent )
|
|||
msg = item->GetTypeDesc().Lower();
|
||||
}
|
||||
|
||||
statusPopup.SetText( wxString::Format( status, msg, ii, count ) );
|
||||
statusPopup.SetText( wxString::Format( popuptext, msg, ii, count ) );
|
||||
};
|
||||
|
||||
std::vector<BOARD_ITEM*> sel_items; // All the items operated on by the move below
|
||||
|
|
Loading…
Reference in New Issue