From 6178e5a975d7e967df0d3d45e402ac0fcfb4b43a Mon Sep 17 00:00:00 2001 From: Trial97 Date: Wed, 23 Aug 2023 13:36:31 +0300 Subject: [PATCH] reverted change for optional Signed-off-by: Trial97 --- launcher/minecraft/PackProfile.h | 1 + launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp | 3 +-- launcher/modplatform/flame/FileResolvingTask.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/minecraft/PackProfile.h b/launcher/minecraft/PackProfile.h index c41601fb2..e72b6ebfe 100644 --- a/launcher/minecraft/PackProfile.h +++ b/launcher/minecraft/PackProfile.h @@ -44,6 +44,7 @@ #include #include #include +#include #include "Component.h" #include "LaunchProfile.h" diff --git a/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp b/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp index 93e1b2ed9..b273d70d7 100644 --- a/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp +++ b/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp @@ -41,8 +41,7 @@ static Version mcVersion(BaseInstance* inst) static ModPlatform::ModLoaderTypes mcLoaders(BaseInstance* inst) { - return static_cast(inst)->getPackProfile()->getSupportedModLoaders().value_or( - ModPlatform::ModLoaderTypes::fromInt(0)); + return static_cast(inst)->getPackProfile()->getSupportedModLoaders().value(); } GetModDependenciesTask::GetModDependenciesTask(QObject* parent, diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp index b13274a6b..463014b6e 100644 --- a/launcher/modplatform/flame/FileResolvingTask.cpp +++ b/launcher/modplatform/flame/FileResolvingTask.cpp @@ -154,7 +154,7 @@ void Flame::FileResolvingTask::modrinthCheckFinished() // If there's more than one mod loader for this version, we can't know for sure // which file is relative to each loader, so it's best to not use any one and // let the user download it manually. - if (std::bitset<8>(file.loaders.toInt()).count() <= 1) { + if (std::bitset<8>(file.loaders).count() <= 1) { out->url = file.downloadUrl; qDebug() << "Found alternative on modrinth " << out->fileName; } else {