From 035caec80174552e529605ca921baffd40624e17 Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 20 May 2026 14:42:07 +0000 Subject: [PATCH] fix excepts --- src/common/settings_setting.h | 26 ++++++++++---------------- src/dynarmic/CMakeLists.txt | 1 - 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/common/settings_setting.h b/src/common/settings_setting.h index 076aceef29..2230d3bd18 100644 --- a/src/common/settings_setting.h +++ b/src/common/settings_setting.h @@ -188,22 +188,16 @@ public: this->SetValue(this->GetDefault()); return; } - try { - if constexpr (std::is_same_v) { - this->SetValue(input); - } else if constexpr (std::is_same_v>) { - this->SetValue(u32(std::stoul(input))); - } else if constexpr (std::is_same_v) { - this->SetValue(input == "true"); - } else if constexpr (std::is_same_v) { - this->SetValue(std::stof(input)); - } else { - this->SetValue(Type(std::stoll(input))); - } - } catch (std::invalid_argument&) { - this->SetValue(this->GetDefault()); - } catch (std::out_of_range&) { - this->SetValue(this->GetDefault()); + if constexpr (std::is_same_v) { + this->SetValue(input); + } else if constexpr (std::is_same_v>) { + this->SetValue(u32(std::strtoul(input.c_str(), NULL, 10))); + } else if constexpr (std::is_same_v) { + this->SetValue(input == "true"); + } else if constexpr (std::is_same_v) { + this->SetValue(std::strtof(input.c_str(), NULL)); + } else { + this->SetValue(Type(std::strtoll(input.c_str(), NULL))); } } diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt index 633caaff27..a8b75d358c 100644 --- a/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/CMakeLists.txt @@ -95,7 +95,6 @@ else() -pedantic -Wno-missing-braces -fno-rtti - #-fno-exceptions ) if (CXX_GCC) # GCC produces bogus -Warray-bounds warnings from xbyak headers for code paths that are not