From a89df42561cc3089c4878c0c44353fcd1359bf53 Mon Sep 17 00:00:00 2001 From: Marcelo Hernandez <76508651+marcelohdez@users.noreply.github.com> Date: Mon, 24 Oct 2022 19:27:21 -0400 Subject: Simplify bool check in CopyInstanceDialog.cpp Signed-off-by: Marcelo Hernandez --- launcher/ui/dialogs/CopyInstanceDialog.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'launcher/ui/dialogs/CopyInstanceDialog.cpp') diff --git a/launcher/ui/dialogs/CopyInstanceDialog.cpp b/launcher/ui/dialogs/CopyInstanceDialog.cpp index 44e70012..1b8e2aa0 100644 --- a/launcher/ui/dialogs/CopyInstanceDialog.cpp +++ b/launcher/ui/dialogs/CopyInstanceDialog.cpp @@ -141,14 +141,7 @@ void CopyInstanceDialog::checkAllCheckboxes(const bool& b) // Sets b to true if state is a checked checkbox void CopyInstanceDialog::checkBool(bool& b, const int& state) { - if(state == Qt::Unchecked) - { - b = false; - } - else if(state == Qt::Checked) - { - b = true; - } + b = (state == Qt::Checked); // Have "Select all" checkbox checked if all options are already checked: ui->selectAllCheckbox->blockSignals(true); -- cgit