From 2d2c176f030fd9c0559a2cf983296e16c4b835c7 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:34:01 -0400 Subject: [PATCH] configure_ui: Remove unnecessary usage of stoul --- src/yuzu/configuration/configure_ui.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/yuzu/configuration/configure_ui.cpp b/src/yuzu/configuration/configure_ui.cpp index 34ab016171..a9fde9f4f3 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 +#include #include #include #include @@ -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)