Fix: Resolve ambiguous overload errors

Clang-cl fails to select the correct function and instead errors

Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
This commit is contained in:
TheLastRar 2022-11-01 14:04:14 +00:00
parent 79a728d7d2
commit e29259cd55
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ auto loadIndexedVersion(QJsonObject &obj) -> ModpackVersion
for (auto file_iter : files) { for (auto file_iter : files) {
File indexed_file; File indexed_file;
auto parent = Json::requireObject(file_iter); 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) { if (!is_primary) {
auto filename = Json::ensureString(parent, "filename"); auto filename = Json::ensureString(parent, "filename");
// Checking suffix here is fine because it's the response from Modrinth, // Checking suffix here is fine because it's the response from Modrinth,

View File

@ -242,7 +242,7 @@ void HttpMetaCache::Load()
foo->local_changed_timestamp = Json::ensureDouble(element_obj, "last_changed_timestamp"); foo->local_changed_timestamp = Json::ensureDouble(element_obj, "last_changed_timestamp");
foo->remote_changed_timestamp = Json::ensureString(element_obj, "remote_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()) { if (!foo->isEternal()) {
foo->current_age = Json::ensureDouble(element_obj, "current_age"); foo->current_age = Json::ensureDouble(element_obj, "current_age");
foo->max_age = Json::ensureDouble(element_obj, "max_age"); foo->max_age = Json::ensureDouble(element_obj, "max_age");