diff --git a/common/view/view.cpp b/common/view/view.cpp index d4e22ff6b3..84f848cd41 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -207,7 +207,7 @@ private: { new_layer = aReorderMap.at( orig_layer ); } - catch( std::out_of_range ) {} + catch( const std::out_of_range& ) {} m_groups[i].first = new_layer; } @@ -665,7 +665,7 @@ void VIEW::ReorderLayerData( std::unordered_map aReorderMap ) { new_idx = aReorderMap.at( orig_idx ); } - catch( std::out_of_range ) + catch( const std::out_of_range& ) { new_idx = orig_idx; } diff --git a/include/view/view.h b/include/view/view.h index 1397b4d545..3938bfdf86 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -590,7 +590,7 @@ public: { return m_layers.at( aLayer ).target == TARGET_CACHED; } - catch( std::out_of_range ) + catch( const std::out_of_range& ) { return false; } diff --git a/kicad/import_project.cpp b/kicad/import_project.cpp index 4f9d043607..3bcc7bb9fe 100644 --- a/kicad/import_project.cpp +++ b/kicad/import_project.cpp @@ -165,7 +165,7 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event ) { pcbframe = Kiway.Player( FRAME_PCB, true ); } - catch( IO_ERROR err ) + catch( const IO_ERROR& err ) { wxMessageBox( _( "Pcbnew failed to load:\n" ) + err.What(), _( "KiCad Error" ), wxOK | wxICON_ERROR, this );