diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-07-01 13:38:32 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-07-01 17:03:11 -0700 |
commit | 2a5d291bd940ea61b8254eb78b478ae86ed17f59 (patch) | |
tree | 1c5ccfa495c4393a540e7097f52c63b7402f746b /launcher/minecraft/mod/tasks/LocalModParseTask.cpp | |
parent | e2a65a70779a66471d98a98a1cc611fcb9bb0d5b (diff) | |
download | PrismLauncher-2a5d291bd940ea61b8254eb78b478ae86ed17f59.tar.gz PrismLauncher-2a5d291bd940ea61b8254eb78b478ae86ed17f59.tar.bz2 PrismLauncher-2a5d291bd940ea61b8254eb78b478ae86ed17f59.zip |
fix: toml without exceptions usage
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/tasks/LocalModParseTask.cpp')
-rw-r--r-- | launcher/minecraft/mod/tasks/LocalModParseTask.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp index 264019f8..f8d454cf 100644 --- a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp +++ b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp @@ -104,14 +104,15 @@ ModDetails ReadMCModTOML(QByteArray contents) #if TOML_EXCEPTIONS try { tomlData = toml::parse(contents.toStdString()); - } catch (const toml::parse_error& err) { + } catch ([[maybe_unused]] const toml::parse_error& err) { return {}; } #else - tomlData = toml::parse(contents.toStdString()); - if (!tomlData) { + toml::parse_result result = toml::parse(contents.toStdString()); + if (!result) { return {}; } + tomlData = result.table(); #endif // array defined by [[mods]] |