aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/Resource.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-07-07 15:19:00 +0200
committerGitHub <noreply@github.com>2023-07-07 15:19:00 +0200
commite225a721807b00297a5733e9d60fe2b5603de77c (patch)
tree91d9e3ba54a32cb5724f0297dd842b990f065db7 /launcher/minecraft/mod/Resource.cpp
parent2cb22ad280ec0b540ec6e96759d478c60562bc9a (diff)
parent13d67c6524a29daea51242d17ba0c6a2b8593747 (diff)
downloadPrismLauncher-e225a721807b00297a5733e9d60fe2b5603de77c.tar.gz
PrismLauncher-e225a721807b00297a5733e9d60fe2b5603de77c.tar.bz2
PrismLauncher-e225a721807b00297a5733e9d60fe2b5603de77c.zip
Merge pull request #1128 from pandaninjas/fix-implicit-fallthrough
Diffstat (limited to 'launcher/minecraft/mod/Resource.cpp')
-rw-r--r--launcher/minecraft/mod/Resource.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/Resource.cpp b/launcher/minecraft/mod/Resource.cpp
index a0b8a4bb..e5077260 100644
--- a/launcher/minecraft/mod/Resource.cpp
+++ b/launcher/minecraft/mod/Resource.cpp
@@ -71,6 +71,7 @@ std::pair<int, bool> Resource::compare(const Resource& other, SortType type) con
return { 1, type == SortType::ENABLED };
if (!enabled() && other.enabled())
return { -1, type == SortType::ENABLED };
+ break;
case SortType::NAME: {
QString this_name{ name() };
QString other_name{ other.name() };
@@ -81,12 +82,14 @@ std::pair<int, bool> Resource::compare(const Resource& other, SortType type) con
auto compare_result = QString::compare(this_name, other_name, Qt::CaseInsensitive);
if (compare_result != 0)
return { compare_result, type == SortType::NAME };
+ break;
}
case SortType::DATE:
if (dateTimeChanged() > other.dateTimeChanged())
return { 1, type == SortType::DATE };
if (dateTimeChanged() < other.dateTimeChanged())
return { -1, type == SortType::DATE };
+ break;
}
return { 0, false };