mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 19:06:58 +03:00
clang-tidy: clang-analyzer-*
This commit aims to fix all clang-analyzer-* warnings from clang-tidy.
Here is the list of the ones found in project:
"clang-analyzer-core.uninitialized.UndefReturn",
"clang-analyzer-deadcode.DeadStores",
"clang-analyzer-optin.core.EnumCastOutOfRange",
Some exceptions:
clang-analyzer-cplusplus.NewDeleteLeaks -> may need to disable it as
is a false positive
clang-analyzer-optin.cplusplus.VirtualCall -> may need to disable it
(or refactor a bunch of code to drop the virtual from those functions)
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
323c25d83b
commit
6699d3eca0
11 changed files with 50 additions and 62 deletions
|
|
@ -63,12 +63,12 @@ void PackInstallTask::copySettings()
|
|||
instance.settings()->set("JvmArgs", m_pack.jvmArgs.toString());
|
||||
}
|
||||
|
||||
auto components = instance.getPackProfile();
|
||||
auto* components = instance.getPackProfile();
|
||||
components->buildingFromScratch();
|
||||
components->setComponentVersion("net.minecraft", m_pack.mcVersion, true);
|
||||
|
||||
auto modloader = m_pack.loaderType;
|
||||
if (modloader.has_value())
|
||||
if (modloader.has_value()) {
|
||||
switch (modloader.value()) {
|
||||
case ModPlatform::NeoForge: {
|
||||
components->setComponentVersion("net.neoforged", m_pack.loaderVersion, true);
|
||||
|
|
@ -86,28 +86,16 @@ void PackInstallTask::copySettings()
|
|||
components->setComponentVersion("org.quiltmc.quilt-loader", m_pack.loaderVersion, true);
|
||||
break;
|
||||
}
|
||||
case ModPlatform::Cauldron:
|
||||
break;
|
||||
case ModPlatform::LiteLoader:
|
||||
break;
|
||||
case ModPlatform::DataPack:
|
||||
break;
|
||||
case ModPlatform::Babric:
|
||||
break;
|
||||
case ModPlatform::BTA:
|
||||
break;
|
||||
case ModPlatform::LegacyFabric:
|
||||
break;
|
||||
case ModPlatform::Ornithe:
|
||||
break;
|
||||
case ModPlatform::Rift:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
components->saveNow();
|
||||
|
||||
instance.setName(name());
|
||||
if (m_instIcon == "default")
|
||||
if (m_instIcon == "default") {
|
||||
m_instIcon = "ftb_logo";
|
||||
}
|
||||
instance.setIconKey(m_instIcon);
|
||||
}
|
||||
emitSucceeded();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue