From e484d2b0cc6c6aa4ee9c7bd6c1d5c204d3421899 Mon Sep 17 00:00:00 2001 From: ZeldaZach Date: Sun, 19 Jan 2025 07:39:57 -0500 Subject: [PATCH] Minor reword --- .../widgets/cards/card_info_frame_widget.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp b/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp index 006df2173..d99904445 100644 --- a/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp +++ b/cockatrice/src/client/ui/widgets/cards/card_info_frame_widget.cpp @@ -115,11 +115,11 @@ void CardInfoFrameWidget::setCard(CardInfoPtr card) } if (info) { - auto relations = info->getAllRelatedCards(); - - for (auto relation : relations) { - if (relation->getDoesTransform()) { + const auto &cardRelations = info->getAllRelatedCards(); + for (const auto &cardRelation : cardRelations) { + if (cardRelation->getDoesTransform()) { viewTransformationButton->setVisible(true); + break; } } } @@ -148,11 +148,11 @@ void CardInfoFrameWidget::setCard(AbstractCardItem *card) void CardInfoFrameWidget::viewTransformation() { if (info) { - auto relations = info->getAllRelatedCards(); - - for (auto relation : relations) { - if (relation->getDoesTransform()) { - setCard(relation->getName()); + const auto &cardRelations = info->getAllRelatedCards(); + for (const auto &cardRelation : cardRelations) { + if (cardRelation->getDoesTransform()) { + viewTransformationButton->setVisible(true); + break; } } }