From 76df836378aa5dd90b0d039358d9927628d48878 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sat, 29 Jul 2023 11:02:10 +0200 Subject: [PATCH] fix: simplify switch statement Signed-off-by: Sefa Eyeoglu --- launcher/minecraft/PackProfile.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/launcher/minecraft/PackProfile.cpp b/launcher/minecraft/PackProfile.cpp index e8fd21572..7cdd47ae6 100644 --- a/launcher/minecraft/PackProfile.cpp +++ b/launcher/minecraft/PackProfile.cpp @@ -591,10 +591,7 @@ QVariant PackProfile::data(const QModelIndex &index, int role) const } case Qt::DecorationRole: { - switch(column) - { - case NameColumn: - { + if (column == NameColumn) { auto severity = patch->getProblemSeverity(); switch (severity) { @@ -606,11 +603,7 @@ QVariant PackProfile::data(const QModelIndex &index, int role) const return QVariant(); } } - default: - { - return QVariant(); - } - } + return QVariant(); } } return QVariant();