configure_cpu: Simplify UpdateGroup
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
This commit is contained in:
parent
12ef74456c
commit
5153d5387a
|
@ -67,14 +67,11 @@ void ConfigureCpu::AccuracyUpdated(int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureCpu::UpdateGroup(int index) {
|
void ConfigureCpu::UpdateGroup(int index) {
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
if (!Settings::IsConfiguringGlobal()) {
|
||||||
ui->unsafe_group->setVisible(static_cast<Settings::CPUAccuracy>(index) ==
|
index -= ConfigurationShared::USE_GLOBAL_OFFSET;
|
||||||
Settings::CPUAccuracy::Unsafe);
|
|
||||||
} else {
|
|
||||||
ui->unsafe_group->setVisible(
|
|
||||||
static_cast<Settings::CPUAccuracy>(index - ConfigurationShared::USE_GLOBAL_OFFSET) ==
|
|
||||||
Settings::CPUAccuracy::Unsafe);
|
|
||||||
}
|
}
|
||||||
|
const auto accuracy = static_cast<Settings::CPUAccuracy>(index);
|
||||||
|
ui->unsafe_group->setVisible(accuracy == Settings::CPUAccuracy::Unsafe);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigureCpu::ApplyConfiguration() {
|
void ConfigureCpu::ApplyConfiguration() {
|
||||||
|
|
Loading…
Reference in New Issue