diff options
author | Marcelo Hernandez <76508651+marcelohdez@users.noreply.github.com> | 2022-10-24 19:27:21 -0400 |
---|---|---|
committer | Marcelo Hernandez <marcelohdez.inq@gmail.com> | 2022-10-24 19:31:40 -0400 |
commit | a89df42561cc3089c4878c0c44353fcd1359bf53 (patch) | |
tree | 94fc6e4573f06a729d98c07de8ac64ad4a0fa976 /launcher/ui/dialogs/CopyInstanceDialog.cpp | |
parent | 4caf06bc99dfe34f10fae943374c98b88ad8814d (diff) | |
download | PrismLauncher-a89df42561cc3089c4878c0c44353fcd1359bf53.tar.gz PrismLauncher-a89df42561cc3089c4878c0c44353fcd1359bf53.tar.bz2 PrismLauncher-a89df42561cc3089c4878c0c44353fcd1359bf53.zip |
Simplify bool check in CopyInstanceDialog.cpp
Signed-off-by: Marcelo Hernandez <marcelohdez.inq@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs/CopyInstanceDialog.cpp')
-rw-r--r-- | launcher/ui/dialogs/CopyInstanceDialog.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
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); |