From 011ea8453015ff4d8fd1f9bed5bed36959c20269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 3 Mar 2014 09:08:32 +0100 Subject: [PATCH] Fix missed version file assignment. --- logic/OneSixVersionBuilder.cpp | 5 ++--- logic/VersionFile.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/logic/OneSixVersionBuilder.cpp b/logic/OneSixVersionBuilder.cpp index 879ff72e..0c63dc2a 100644 --- a/logic/OneSixVersionBuilder.cpp +++ b/logic/OneSixVersionBuilder.cpp @@ -90,8 +90,7 @@ void OneSixVersionBuilder::buildInternal(const bool onlyVanilla, const QStringLi { // version.json QLOG_INFO() << "Reading version.json"; - VersionFile file; - parseJsonFile(QFileInfo(root.absoluteFilePath("version.json")), false, &file); + VersionFile file = parseJsonFile(QFileInfo(root.absoluteFilePath("version.json")), false); file.name = "Minecraft"; file.fileId = "org.multimc.version.json"; file.version = m_instance->intendedVersionId(); @@ -124,7 +123,7 @@ void OneSixVersionBuilder::buildInternal(const bool onlyVanilla, const QStringLi for (auto order : files.keys()) { QLOG_DEBUG() << "Applying file with order" << order; - auto filePair = files[order]; + auto & filePair = files[order]; filePair.second.applyTo(m_version); } } while(0); diff --git a/logic/VersionFile.h b/logic/VersionFile.h index 0f183ae8..0475f927 100644 --- a/logic/VersionFile.h +++ b/logic/VersionFile.h @@ -64,7 +64,7 @@ public: /* methods */ void applyTo(VersionFinal *version); public: /* data */ - int order; + int order = 0; QString name; QString fileId; QString version;