Catch exceptions by reference instead of by value (silence warning)

This commit is contained in:
Joseph Lenox 2021-04-03 11:44:53 -05:00
parent 8e6324954c
commit 1433ba65c9

View File

@ -369,7 +369,7 @@ void MainFrame::update_layout()
try { try {
icon_size = atoi(wxGetApp().app_config->get("tab_icon_size").c_str()); icon_size = atoi(wxGetApp().app_config->get("tab_icon_size").c_str());
} }
catch (std::exception e) {} catch (const std::exception& e) {}
if(icon_size >= 8) if(icon_size >= 8)
for (std::string icon_name : {"editor_menu", "layers", "preview_menu", "cog"}) { for (std::string icon_name : {"editor_menu", "layers", "preview_menu", "cog"}) {
const wxBitmap& bmp = create_scaled_bitmap(icon_name, this, icon_size); const wxBitmap& bmp = create_scaled_bitmap(icon_name, this, icon_size);