diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 6cf1ead87..6579996d2 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2601,11 +2601,11 @@ namespace MWWorld int y = std::stoi(name.substr(name.find(',')+1)); ext = getExterior(x, y)->getCell(); } - catch (std::invalid_argument) + catch (const std::invalid_argument&) { // This exception can be ignored, as this means that name probably refers to a interior cell instead of comma separated coordinates } - catch (std::out_of_range) + catch (const std::out_of_range&) { throw std::runtime_error("Cell coordinates out of range."); } diff --git a/components/widgets/numericeditbox.cpp b/components/widgets/numericeditbox.cpp index ee2c30a7b..efe480653 100644 --- a/components/widgets/numericeditbox.cpp +++ b/components/widgets/numericeditbox.cpp @@ -38,11 +38,11 @@ namespace Gui setCaption(MyGUI::utility::toString(mValue)); } } - catch (std::invalid_argument) + catch (const std::invalid_argument&) { setCaption(MyGUI::utility::toString(mValue)); } - catch (std::out_of_range) + catch (const std::out_of_range&) { setCaption(MyGUI::utility::toString(mValue)); }