Remove some redundant default values

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2025-11-09 22:21:46 +00:00
parent 755ddd0f7f
commit 6475ce6623
2 changed files with 2 additions and 2 deletions

View File

@@ -180,7 +180,7 @@ bool processMCMeta(DataPack* pack, QByteArray&& raw_data)
auto json_doc = QJsonDocument::fromJson(raw_data);
auto pack_obj = Json::requireObject(json_doc.object(), "pack", {});
pack->setPackFormat(pack_obj["pack_format"].toInt(0));
pack->setPackFormat(pack_obj["pack_format"].toInt());
pack->setDescription(DataPackUtils::processComponent(pack_obj.value("description")));
} catch (Json::JsonException& e) {
qWarning() << "JsonException: " << e.what() << e.cause();

View File

@@ -270,7 +270,7 @@ void HttpMetaCache::Load()
foo->m_local_changed_timestamp = element_obj["last_changed_timestamp"].toDouble();
foo->m_remote_changed_timestamp = element_obj["remote_changed_timestamp"].toString();
foo->makeEternal(element_obj[QStringLiteral("eternal")].toBool(false));
foo->makeEternal(element_obj[QStringLiteral("eternal")].toBool());
if (!foo->isEternal()) {
foo->m_current_age = element_obj["current_age"].toDouble();
foo->m_max_age = element_obj["max_age"].toDouble();