mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
refactor!!!: migrate from shared pointers
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
c64d871a28
commit
549405ab2f
199 changed files with 742 additions and 709 deletions
|
|
@ -19,10 +19,10 @@ bool VanillaCreationTask::createInstance()
|
|||
{
|
||||
setStatus(tr("Creating instance from version %1").arg(m_version->name()));
|
||||
|
||||
auto instance_settings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
||||
auto instance_settings = std::make_unique<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
||||
instance_settings->suspendSave();
|
||||
{
|
||||
MinecraftInstance inst(m_globalSettings, instance_settings, m_stagingPath);
|
||||
MinecraftInstance inst(m_globalSettings, std::move(instance_settings), m_stagingPath);
|
||||
auto components = inst.getPackProfile();
|
||||
components->buildingFromScratch();
|
||||
components->setComponentVersion("net.minecraft", m_version->descriptor(), true);
|
||||
|
|
@ -31,8 +31,9 @@ bool VanillaCreationTask::createInstance()
|
|||
|
||||
inst.setName(name());
|
||||
inst.setIconKey(m_instIcon);
|
||||
|
||||
inst.settings()->resumeSave();
|
||||
}
|
||||
instance_settings->resumeSave();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue