aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/technic/TechnicPackProcessor.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-30 23:51:15 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-01 23:39:38 -0700
commit8d7dcdfc5b2a231a1304878e25929e6f4ff4e338 (patch)
tree761f56c74858e9811b9fa78ff63392f51836678c /launcher/modplatform/technic/TechnicPackProcessor.cpp
parent98d6904e4a84836c1b9ec662b0b8a49d5282e27b (diff)
downloadPrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.tar.gz
PrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.tar.bz2
PrismLauncher-8d7dcdfc5b2a231a1304878e25929e6f4ff4e338.zip
chore: fix shadowed member and signed/unsigned mismatch
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: supress unused with [[maybe_unused]] Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: unshadow ^&^& static_cast implicit return Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: deshadow and mark unused in parse task Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: mark unused in folder models Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: deshadow and mark unused with instances Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: more deshadow and unused Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: remove uneeded simicolons Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: mark unused Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> chore: prevent shadow Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/modplatform/technic/TechnicPackProcessor.cpp')
-rw-r--r--launcher/modplatform/technic/TechnicPackProcessor.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/launcher/modplatform/technic/TechnicPackProcessor.cpp b/launcher/modplatform/technic/TechnicPackProcessor.cpp
index df713a72..e473c170 100644
--- a/launcher/modplatform/technic/TechnicPackProcessor.cpp
+++ b/launcher/modplatform/technic/TechnicPackProcessor.cpp
@@ -26,7 +26,12 @@
#include <memory>
-void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const QString &instName, const QString &instIcon, const QString &stagingPath, const QString &minecraftVersion, const bool isSolder)
+void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings,
+ const QString& instName,
+ const QString& instIcon,
+ const QString& stagingPath,
+ const QString& minecraftVersion,
+ [[maybe_unused]] const bool isSolder)
{
QString minecraftPath = FS::PathCombine(stagingPath, ".minecraft");
QString configPath = FS::PathCombine(stagingPath, "instance.cfg");
@@ -151,17 +156,16 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const
{
QJsonDocument doc = Json::requireDocument(data);
QJsonObject root = Json::requireObject(doc, "version.json");
- QString minecraftVersion = Json::ensureString(root, "inheritsFrom", QString(), "");
- if (minecraftVersion.isEmpty())
- {
+ QString packMinecraftVersion = Json::ensureString(root, "inheritsFrom", QString(), "");
+ if (packMinecraftVersion.isEmpty()) {
if (fmlMinecraftVersion.isEmpty())
{
emit failed(tr("Could not understand \"version.json\":\ninheritsFrom is missing"));
return;
}
- minecraftVersion = fmlMinecraftVersion;
+ packMinecraftVersion = fmlMinecraftVersion;
}
- components->setComponentVersion("net.minecraft", minecraftVersion, true);
+ components->setComponentVersion("net.minecraft", packMinecraftVersion, true);
for (auto library: Json::ensureArray(root, "libraries", {}))
{
if (!library.isObject())