From 5153d5387aa8946af0e885596c42d05001422d42 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Thu, 20 May 2021 01:11:56 -0400 Subject: [PATCH] configure_cpu: Simplify UpdateGroup Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com> --- src/yuzu/configuration/configure_cpu.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/yuzu/configuration/configure_cpu.cpp b/src/yuzu/configuration/configure_cpu.cpp index 901e54e0d..525c42ff0 100644 --- a/src/yuzu/configuration/configure_cpu.cpp +++ b/src/yuzu/configuration/configure_cpu.cpp @@ -67,14 +67,11 @@ void ConfigureCpu::AccuracyUpdated(int index) { } void ConfigureCpu::UpdateGroup(int index) { - if (Settings::IsConfiguringGlobal()) { - ui->unsafe_group->setVisible(static_cast(index) == - Settings::CPUAccuracy::Unsafe); - } else { - ui->unsafe_group->setVisible( - static_cast(index - ConfigurationShared::USE_GLOBAL_OFFSET) == - Settings::CPUAccuracy::Unsafe); + if (!Settings::IsConfiguringGlobal()) { + index -= ConfigurationShared::USE_GLOBAL_OFFSET; } + const auto accuracy = static_cast(index); + ui->unsafe_group->setVisible(accuracy == Settings::CPUAccuracy::Unsafe); } void ConfigureCpu::ApplyConfiguration() {