mirror of
https://github.com/OpenMW/openmw.git
synced 2025-07-07 00:41:35 +00:00
Switch conversions to use default values and don't care about the result of the conversion
This commit is contained in:
parent
0bac41cfd1
commit
803f15b20f
1 changed files with 3 additions and 12 deletions
|
@ -197,26 +197,17 @@ namespace MWRender
|
|||
|
||||
if (settingArgs.size() > 1)
|
||||
{
|
||||
if (const auto w = Misc::StringUtils::toNumeric<int>(settingArgs[1]))
|
||||
{
|
||||
screenshotW = std::min(10000, w.value());
|
||||
}
|
||||
screenshotW = std::min(10000, Misc::StringUtils::toNumeric<int>(settingArgs[1], 0));
|
||||
}
|
||||
|
||||
if (settingArgs.size() > 2)
|
||||
{
|
||||
if (const auto h = Misc::StringUtils::toNumeric<int>(settingArgs[2]))
|
||||
{
|
||||
screenshotH = std::min(10000, h.value());
|
||||
}
|
||||
screenshotH = std::min(10000, Misc::StringUtils::toNumeric<int>(settingArgs[2], 0));
|
||||
}
|
||||
|
||||
if (settingArgs.size() > 3)
|
||||
{
|
||||
if (const auto cs = Misc::StringUtils::toNumeric<int>(settingArgs[3]))
|
||||
{
|
||||
cubeSize = std::min(5000, cs.value());
|
||||
}
|
||||
cubeSize = std::min(5000, Misc::StringUtils::toNumeric<int>(settingArgs[3], 0));
|
||||
}
|
||||
|
||||
bool rawCubemap = screenshotMapping == RawCubemap;
|
||||
|
|
Loading…
Reference in a new issue