mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
chore(clang-tidy): fix clang tidy warnings
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
b7381d8088
commit
670f49309c
3 changed files with 11 additions and 13 deletions
|
|
@ -7,30 +7,27 @@
|
|||
#include "minecraft/PackProfile.h"
|
||||
#include "settings/INISettingsObject.h"
|
||||
|
||||
VanillaCreationTask::VanillaCreationTask(BaseVersion::Ptr version, QString loader, BaseVersion::Ptr loader_version)
|
||||
: InstanceCreationTask()
|
||||
, m_version(std::move(version))
|
||||
, m_using_loader(true)
|
||||
, m_loader(std::move(loader))
|
||||
, m_loader_version(std::move(loader_version))
|
||||
VanillaCreationTask::VanillaCreationTask(BaseVersion::Ptr version, QString loader, BaseVersion::Ptr loaderVersion)
|
||||
: m_version(std::move(version)), m_using_loader(true), m_loader(std::move(loader)), m_loader_version(std::move(loaderVersion))
|
||||
{}
|
||||
|
||||
std::unique_ptr<MinecraftInstance> VanillaCreationTask::createInstance()
|
||||
{
|
||||
setStatus(tr("Creating instance from version %1").arg(m_version->name()));
|
||||
|
||||
auto inst = std::make_unique<MinecraftInstance>(m_globalSettings, std::make_unique<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg")),
|
||||
m_stagingPath);
|
||||
auto inst = std::make_unique<MinecraftInstance>(
|
||||
m_globalSettings, std::make_unique<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg")), m_stagingPath);
|
||||
SettingsObject::Lock lock(inst->settings());
|
||||
|
||||
auto components = inst->getPackProfile();
|
||||
auto* components = inst->getPackProfile();
|
||||
components->buildingFromScratch();
|
||||
components->setComponentVersion("net.minecraft", m_version->descriptor(), true);
|
||||
if (m_using_loader)
|
||||
if (m_using_loader) {
|
||||
components->setComponentVersion(m_loader, m_loader_version->descriptor());
|
||||
}
|
||||
|
||||
inst->setName(name());
|
||||
inst->setIconKey(m_instIcon);
|
||||
|
||||
components->saveNow();
|
||||
return inst;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue