Cleanup compiler warnings
This commit is contained in:
parent
1cae0b6c08
commit
d50d728d19
|
@ -165,7 +165,7 @@ const wxString KIWAY::dso_search_path( FACE_T aFaceId )
|
|||
|
||||
// Here a "suffix" == an extension with a preceding '.',
|
||||
// so skip the preceding '.' to get an extension
|
||||
fn.SetExt( KIFACE_SUFFIX + 1 ); // + 1 => &KIFACE_SUFFIX[1]
|
||||
fn.SetExt( &KIFACE_SUFFIX[1] );
|
||||
|
||||
return fn.GetFullPath();
|
||||
}
|
||||
|
|
|
@ -207,10 +207,11 @@ bool SCH_EDIT_TOOL::Init()
|
|||
if( aSel.GetSize() == 0 )
|
||||
return true; // Show worksheet properties
|
||||
|
||||
SCH_ITEM* firstItem = dynamic_cast<SCH_ITEM*>( aSel.Front() );
|
||||
SCH_ITEM* firstItem = dynamic_cast<SCH_ITEM*>( aSel.Front() );
|
||||
const EE_SELECTION* eeSelection = dynamic_cast<const EE_SELECTION*>( &aSel );
|
||||
|
||||
wxCHECK( firstItem, false );
|
||||
if( !firstItem || !eeSelection )
|
||||
return false;
|
||||
|
||||
switch( firstItem->Type() )
|
||||
{
|
||||
|
|
|
@ -87,14 +87,14 @@ void DIALOG_FOOTPRINT_CHECKER::runChecks()
|
|||
}
|
||||
|
||||
OUTLINE_ERROR_HANDLER errorHandler =
|
||||
[&]( const wxString& msg, BOARD_ITEM* itemA, BOARD_ITEM* itemB, const wxPoint& pt )
|
||||
[&]( const wxString& aMsg, BOARD_ITEM* aItemA, BOARD_ITEM* aItemB, const wxPoint& aPt )
|
||||
{
|
||||
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_MALFORMED_COURTYARD );
|
||||
|
||||
drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS( " " ) + msg );
|
||||
drcItem->SetItems( itemA, itemB );
|
||||
drcItem->SetErrorMessage( drcItem->GetErrorText() + wxS( " " ) + aMsg );
|
||||
drcItem->SetItems( aItemA, aItemB );
|
||||
|
||||
PCB_MARKER* marker = new PCB_MARKER( drcItem, pt );
|
||||
PCB_MARKER* marker = new PCB_MARKER( drcItem, aPt );
|
||||
board->Add( marker );
|
||||
m_frame->GetCanvas()->GetView()->Add( marker );
|
||||
};
|
||||
|
|
|
@ -162,19 +162,21 @@ void MWAVE_POLYGONAL_SHAPE_DLG::OnOkClick( wxCommandEvent& event )
|
|||
void MWAVE_POLYGONAL_SHAPE_DLG::ReadDataShapeDescr( wxCommandEvent& event )
|
||||
{
|
||||
static wxString lastpath; // To remember the last open path during a session
|
||||
wxString fullFileName;
|
||||
wxString mask = wxFileSelectorDefaultWildcardStr;
|
||||
|
||||
wxString FullFileName = EDA_FILE_SELECTOR( _( "Read descr shape file" ), lastpath,
|
||||
FullFileName, wxEmptyString, mask, this,
|
||||
wxFD_OPEN, true );
|
||||
if( FullFileName.IsEmpty() )
|
||||
fullFileName = EDA_FILE_SELECTOR( _( "Read descr shape file" ), lastpath,
|
||||
fullFileName, wxEmptyString, mask, this,
|
||||
wxFD_OPEN, true );
|
||||
|
||||
if( fullFileName.IsEmpty() )
|
||||
return;
|
||||
|
||||
wxFileName fn( FullFileName );
|
||||
wxFileName fn( fullFileName );
|
||||
lastpath = fn.GetPath();
|
||||
PolyEdges.clear();
|
||||
|
||||
FILE* File = wxFopen( FullFileName, wxT( "rt" ) );
|
||||
FILE* File = wxFopen( fullFileName, wxT( "rt" ) );
|
||||
|
||||
if( File == NULL )
|
||||
{
|
||||
|
@ -185,7 +187,7 @@ void MWAVE_POLYGONAL_SHAPE_DLG::ReadDataShapeDescr( wxCommandEvent& event )
|
|||
double unitconv = IU_PER_MM;
|
||||
ShapeScaleX = ShapeScaleY = 1.0;
|
||||
|
||||
FILE_LINE_READER fileReader( File, FullFileName );
|
||||
FILE_LINE_READER fileReader( File, fullFileName );
|
||||
FILTER_READER reader( fileReader );
|
||||
|
||||
LOCALE_IO toggle;
|
||||
|
|
|
@ -2032,14 +2032,14 @@ int DRAWING_TOOL::DrawZone( const TOOL_EVENT& aEvent )
|
|||
evt->SetPassEvent();
|
||||
}
|
||||
}
|
||||
else if( evt->IsAction( &ACTIONS::updateUnits ) )
|
||||
/*else if( evt->IsAction( &ACTIONS::updateUnits ) )
|
||||
{
|
||||
// If we ever have an assistant here that reports dimensions, we'll want to
|
||||
// update its units here....
|
||||
// zoneAsst.SetUnits( frame()->GetUserUnits() );
|
||||
// m_view->Update( &zoneAsst );
|
||||
evt->SetPassEvent();
|
||||
}
|
||||
}*/
|
||||
else
|
||||
{
|
||||
evt->SetPassEvent();
|
||||
|
|
|
@ -609,7 +609,7 @@ void GRID_HELPER::computeAnchors( BOARD_ITEM* aItem, const VECTOR2I& aRefPos, bo
|
|||
break;
|
||||
|
||||
case S_POLYGON:
|
||||
for( const VECTOR2I& p : shape->BuildPolyPointsList() )
|
||||
for( const wxPoint& p : shape->BuildPolyPointsList() )
|
||||
addAnchor( p, CORNER | SNAPPABLE, shape );
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue