Coverity fixes.
This commit is contained in:
parent
7fe3999457
commit
30a4d3d2de
|
@ -1137,7 +1137,7 @@ void EDA_BASE_FRAME::OnDropFiles( wxDropFilesEvent& aEvent )
|
|||
|
||||
void EDA_BASE_FRAME::DoWithAcceptedFiles()
|
||||
{
|
||||
for( auto file : m_AcceptedFiles )
|
||||
for( const wxFileName& file : m_AcceptedFiles )
|
||||
{
|
||||
wxString fn = file.GetFullPath();
|
||||
m_toolManager->RunAction( *m_acceptedExts.at( file.GetExt() ), true, &fn );
|
||||
|
|
|
@ -231,10 +231,13 @@ bool EE_SELECTION_TOOL::Init()
|
|||
if ( !m_isSymbolEditor )
|
||||
return false;
|
||||
|
||||
SYMBOL_EDIT_FRAME* symEditFrame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame );
|
||||
SYMBOL_EDIT_FRAME* symbolEditorFrame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame );
|
||||
|
||||
return symEditFrame->GetCurSymbol() && symEditFrame->GetCurSymbol()->IsMulti()
|
||||
&& symEditFrame->IsSymbolEditable() && !symEditFrame->IsSymbolAlias();
|
||||
return symbolEditorFrame
|
||||
&& symbolEditorFrame->GetCurSymbol()
|
||||
&& symbolEditorFrame->GetCurSymbol()->IsMulti()
|
||||
&& symbolEditorFrame->IsSymbolEditable()
|
||||
&& !symbolEditorFrame->IsSymbolAlias();
|
||||
};
|
||||
|
||||
auto& menu = m_menu.GetMenu();
|
||||
|
|
|
@ -678,7 +678,7 @@ void GERBVIEW_FRAME::DoWithAcceptedFiles()
|
|||
{
|
||||
wxString gerbFn; // param to be sent with action event.
|
||||
|
||||
for( auto file : m_AcceptedFiles )
|
||||
for( const wxFileName& file : m_AcceptedFiles )
|
||||
{
|
||||
if( IsExtensionAccepted( file.GetExt(), { ArchiveFileExtension } ) )
|
||||
{
|
||||
|
|
|
@ -419,7 +419,7 @@ void KICAD_MANAGER_FRAME::DoWithAcceptedFiles()
|
|||
// All fileNames are now in m_AcceptedFiles vector.
|
||||
// Check if contains a project file name and load project.
|
||||
// If not, open files in dedicated app.
|
||||
for( auto fileName : m_AcceptedFiles )
|
||||
for( const wxFileName& fileName : m_AcceptedFiles )
|
||||
{
|
||||
if( IsExtensionAccepted( fileName.GetExt(),
|
||||
{ ProjectFileExtension, LegacyProjectFileExtension } ) )
|
||||
|
|
|
@ -324,6 +324,6 @@ bool PL_EDITOR_FRAME::SaveDrawingSheetFile( const wxString& aFullFileName )
|
|||
|
||||
void PL_EDITOR_FRAME::DoWithAcceptedFiles()
|
||||
{
|
||||
for( wxFileName file : m_AcceptedFiles )
|
||||
for( const wxFileName& file : m_AcceptedFiles )
|
||||
OpenProjectFiles( { file.GetFullPath() }, KICTL_CREATE );
|
||||
}
|
Loading…
Reference in New Issue