From 54e22858e2d79a48733f449f8e4fbfbd9afcf836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Sun, 17 Nov 2024 14:01:44 +0100 Subject: [PATCH] Combine if-statement. --- common/decklist.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/decklist.cpp b/common/decklist.cpp index 6136a8105..cccb30f8e 100644 --- a/common/decklist.cpp +++ b/common/decklist.cpp @@ -158,10 +158,8 @@ AbstractDecklistNode *InnerDecklistNode::findChild(const QString &_name) AbstractDecklistNode *InnerDecklistNode::findCardChildByNameAndUUID(const QString &_name, const QString &_uuid) { for (int i = 0; i < size(); i++) { - if (at(i) != nullptr) { - if (at(i)->getName() == _name && at(i)->getCardUuid() == _uuid) { - return at(i); - } + if (at(i) != nullptr && at(i)->getName() == _name && at(i)->getCardUuid() == _uuid) { + return at(i); } } return nullptr;