diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-09-28 22:50:12 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-09-28 22:50:12 +0300 |
commit | 9acbf98f940204cd141203a6eccbc9a7351e5a78 (patch) | |
tree | 6ac8fe4b0e51ee58c67e02783fe97b00de707167 /launcher/modplatform/packwiz | |
parent | 254444470f020b086648ac496ebfffb7d3e9ce05 (diff) | |
parent | 59e565ef96b85be9a25fa5d4f1723ee87fd5e75e (diff) | |
download | PrismLauncher-9acbf98f940204cd141203a6eccbc9a7351e5a78.tar.gz PrismLauncher-9acbf98f940204cd141203a6eccbc9a7351e5a78.tar.bz2 PrismLauncher-9acbf98f940204cd141203a6eccbc9a7351e5a78.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into feat/acknowledge_release_type
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/packwiz')
-rw-r--r-- | launcher/modplatform/packwiz/Packwiz.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/launcher/modplatform/packwiz/Packwiz.cpp b/launcher/modplatform/packwiz/Packwiz.cpp index 1be28378..71f66bf3 100644 --- a/launcher/modplatform/packwiz/Packwiz.cpp +++ b/launcher/modplatform/packwiz/Packwiz.cpp @@ -89,7 +89,8 @@ auto intEntry(toml::table table, QString entry_name) -> int return node.value_or(0); } -auto V1::createModFormat(QDir& index_dir, ModPlatform::IndexedPack& mod_pack, ModPlatform::IndexedVersion& mod_version) -> Mod +auto V1::createModFormat([[maybe_unused]] QDir& index_dir, ModPlatform::IndexedPack& mod_pack, ModPlatform::IndexedVersion& mod_version) + -> Mod { Mod mod; @@ -114,7 +115,7 @@ auto V1::createModFormat(QDir& index_dir, ModPlatform::IndexedPack& mod_pack, Mo return mod; } -auto V1::createModFormat(QDir& index_dir, ::Mod& internal_mod, QString slug) -> Mod +auto V1::createModFormat(QDir& index_dir, [[maybe_unused]] ::Mod& internal_mod, QString slug) -> Mod { // Try getting metadata if it exists Mod mod{ getIndexForMod(index_dir, slug) }; @@ -241,12 +242,13 @@ auto V1::getIndexForMod(QDir& index_dir, QString slug) -> Mod return {}; } #else - table = toml::parse_file(StringUtils::toStdString(index_dir.absoluteFilePath(real_fname))); - if (!table) { + toml::parse_result result = toml::parse_file(StringUtils::toStdString(index_dir.absoluteFilePath(real_fname))); + if (!result) { qWarning() << QString("Could not open file %1!").arg(normalized_fname); - qWarning() << "Reason: " << QString(table.error().what()); + qWarning() << "Reason: " << result.error().description(); return {}; } + table = result.table(); #endif // index_file.close(); |