From ddec3d2431879e1e8fd12ab104e545177a296c3b Mon Sep 17 00:00:00 2001 From: BlackMark Date: Fri, 17 Jul 2020 17:31:56 +0200 Subject: [PATCH] Collapse else-if --- AdaptiveBrightness/main_window.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AdaptiveBrightness/main_window.cpp b/AdaptiveBrightness/main_window.cpp index fba211d..15f56a9 100644 --- a/AdaptiveBrightness/main_window.cpp +++ b/AdaptiveBrightness/main_window.cpp @@ -342,10 +342,8 @@ bool MainWindow::setMonitorBrightness(float brightness) if(!m_monitors[i].driver.setBrightness(m_monitors[i].brightness)) { errorOccurred = true; } - else { - if(m_ui.monitorDropdown->currentIndex() == i) { - updateCurrentMonitorGUI(i); - } + else if(m_ui.monitorDropdown->currentIndex() == i) { + updateCurrentMonitorGUI(i); } }