From c993209b763f1d00e2e003d6ea6fa6c5d1afec02 Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Wed, 26 Oct 2022 01:44:29 +0100 Subject: Fix: Explicitly specify Version.h path MSVC uses a different search mechanism that ends up picking the mete Version.h Signed-off-by: TheLastRar --- launcher/modplatform/ModAPI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'launcher/modplatform') diff --git a/launcher/modplatform/ModAPI.h b/launcher/modplatform/ModAPI.h index c7408835..703de143 100644 --- a/launcher/modplatform/ModAPI.h +++ b/launcher/modplatform/ModAPI.h @@ -39,7 +39,7 @@ #include #include -#include "Version.h" +#include "../Version.h" #include "net/NetJob.h" namespace ModPlatform { -- cgit From e29259cd5511f25a4559ff1f8a4e9473ad81ee4e Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Tue, 1 Nov 2022 14:04:14 +0000 Subject: Fix: Resolve ambiguous overload errors Clang-cl fails to select the correct function and instead errors Signed-off-by: TheLastRar --- launcher/modplatform/modrinth/ModrinthPackManifest.cpp | 2 +- launcher/net/HttpMetaCache.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'launcher/modplatform') diff --git a/launcher/modplatform/modrinth/ModrinthPackManifest.cpp b/launcher/modplatform/modrinth/ModrinthPackManifest.cpp index a4620df9..96f54067 100644 --- a/launcher/modplatform/modrinth/ModrinthPackManifest.cpp +++ b/launcher/modplatform/modrinth/ModrinthPackManifest.cpp @@ -140,7 +140,7 @@ auto loadIndexedVersion(QJsonObject &obj) -> ModpackVersion for (auto file_iter : files) { File indexed_file; auto parent = Json::requireObject(file_iter); - auto is_primary = Json::ensureBoolean(parent, "primary", false); + auto is_primary = Json::ensureBoolean(parent, (const QString)QStringLiteral("primary"), false); if (!is_primary) { auto filename = Json::ensureString(parent, "filename"); // Checking suffix here is fine because it's the response from Modrinth, diff --git a/launcher/net/HttpMetaCache.cpp b/launcher/net/HttpMetaCache.cpp index 42198b71..e242dcf4 100644 --- a/launcher/net/HttpMetaCache.cpp +++ b/launcher/net/HttpMetaCache.cpp @@ -242,7 +242,7 @@ void HttpMetaCache::Load() foo->local_changed_timestamp = Json::ensureDouble(element_obj, "last_changed_timestamp"); foo->remote_changed_timestamp = Json::ensureString(element_obj, "remote_changed_timestamp"); - foo->makeEternal(Json::ensureBoolean(element_obj, "eternal", false)); + foo->makeEternal(Json::ensureBoolean(element_obj, (const QString)QStringLiteral("eternal"), false)); if (!foo->isEternal()) { foo->current_age = Json::ensureDouble(element_obj, "current_age"); foo->max_age = Json::ensureDouble(element_obj, "max_age"); -- cgit