diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-09-13 19:34:01 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-09-13 19:52:09 +0200 |
commit | 2d2c176f030fd9c0559a2cf983296e16c4b835c7 (patch) | |
tree | 97f400b7b11e8d5f9783642cc4fddd1698054ca7 /src | |
parent | cheat_engine: Remove uncaught usage of stoul (diff) | |
download | yuzu-2d2c176f030fd9c0559a2cf983296e16c4b835c7.tar yuzu-2d2c176f030fd9c0559a2cf983296e16c4b835c7.tar.gz yuzu-2d2c176f030fd9c0559a2cf983296e16c4b835c7.tar.bz2 yuzu-2d2c176f030fd9c0559a2cf983296e16c4b835c7.tar.lz yuzu-2d2c176f030fd9c0559a2cf983296e16c4b835c7.tar.xz yuzu-2d2c176f030fd9c0559a2cf983296e16c4b835c7.tar.zst yuzu-2d2c176f030fd9c0559a2cf983296e16c4b835c7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/yuzu/configuration/configure_ui.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/yuzu/configuration/configure_ui.cpp b/src/yuzu/configuration/configure_ui.cpp index 34ab01617..a9fde9f4f 100644 --- a/src/yuzu/configuration/configure_ui.cpp +++ b/src/yuzu/configuration/configure_ui.cpp @@ -4,6 +4,7 @@ #include "yuzu/configuration/configure_ui.h" #include <array> +#include <cstdlib> #include <set> #include <stdexcept> #include <string> @@ -94,11 +95,7 @@ static void PopulateResolutionComboBox(QComboBox* screenshot_height, QWidget* pa } static u32 ScreenshotDimensionToInt(const QString& height) { - try { - return std::stoi(height.toStdString()); - } catch (std::invalid_argument&) { - return 0; - } + return std::strtoul(height.toUtf8(), nullptr, 0); } ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent) |