aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-23 13:36:31 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-23 13:55:38 +0300
commit6178e5a975d7e967df0d3d45e402ac0fcfb4b43a (patch)
tree4c76f912b54b7923df34937e859dc514c1d2cb40 /launcher
parentaa065f2b5173dc56614ac45649ada06b74681a53 (diff)
downloadPrismLauncher-6178e5a975d7e967df0d3d45e402ac0fcfb4b43a.tar.gz
PrismLauncher-6178e5a975d7e967df0d3d45e402ac0fcfb4b43a.tar.bz2
PrismLauncher-6178e5a975d7e967df0d3d45e402ac0fcfb4b43a.zip
reverted change for optional
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/minecraft/PackProfile.h1
-rw-r--r--launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp3
-rw-r--r--launcher/modplatform/flame/FileResolvingTask.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/launcher/minecraft/PackProfile.h b/launcher/minecraft/PackProfile.h
index c41601fb..e72b6ebf 100644
--- a/launcher/minecraft/PackProfile.h
+++ b/launcher/minecraft/PackProfile.h
@@ -44,6 +44,7 @@
#include <QList>
#include <QString>
#include <memory>
+#include <optional>
#include "Component.h"
#include "LaunchProfile.h"
diff --git a/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp b/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp
index 93e1b2ed..b273d70d 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<MinecraftInstance*>(inst)->getPackProfile()->getSupportedModLoaders().value_or(
- ModPlatform::ModLoaderTypes::fromInt(0));
+ return static_cast<MinecraftInstance*>(inst)->getPackProfile()->getSupportedModLoaders().value();
}
GetModDependenciesTask::GetModDependenciesTask(QObject* parent,
diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp
index b13274a6..463014b6 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 {