mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 09:39:56 +00:00
Merge pull request #1726 from elsid/fix_catch_warnings
Fix warnings: catching polymorphic type by value
This commit is contained in:
commit
4a2b973052
@ -2601,11 +2601,11 @@ namespace MWWorld
|
|||||||
int y = std::stoi(name.substr(name.find(',')+1));
|
int y = std::stoi(name.substr(name.find(',')+1));
|
||||||
ext = getExterior(x, y)->getCell();
|
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
|
// 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.");
|
throw std::runtime_error("Cell coordinates out of range.");
|
||||||
}
|
}
|
||||||
|
@ -38,11 +38,11 @@ namespace Gui
|
|||||||
setCaption(MyGUI::utility::toString(mValue));
|
setCaption(MyGUI::utility::toString(mValue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::invalid_argument)
|
catch (const std::invalid_argument&)
|
||||||
{
|
{
|
||||||
setCaption(MyGUI::utility::toString(mValue));
|
setCaption(MyGUI::utility::toString(mValue));
|
||||||
}
|
}
|
||||||
catch (std::out_of_range)
|
catch (const std::out_of_range&)
|
||||||
{
|
{
|
||||||
setCaption(MyGUI::utility::toString(mValue));
|
setCaption(MyGUI::utility::toString(mValue));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user