refactor!!!: migrate from shared pointers

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2026-01-07 19:16:54 +05:00
parent c64d871a28
commit 549405ab2f
No known key found for this signature in database
GPG key ID: B77C34313AEE1FFF
199 changed files with 742 additions and 709 deletions

View file

@ -91,7 +91,7 @@ bool FlameCreationTask::updateInstance()
auto instance_list = APPLICATION->instances();
// FIXME: How to handle situations when there's more than one install already for a given modpack?
InstancePtr inst;
BaseInstance* inst;
if (auto original_id = originalInstanceID(); !original_id.isEmpty()) {
inst = instance_list->getInstanceById(original_id);
Q_ASSERT(inst);
@ -185,7 +185,7 @@ bool FlameCreationTask::updateInstance()
}
auto raw_response = std::make_shared<QByteArray>();
auto job = api.getFiles(fileIds, raw_response);
auto job = api.getFiles(fileIds, raw_response.get());
QEventLoop loop;
@ -386,8 +386,8 @@ bool FlameCreationTask::createInstance()
}
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
auto instanceSettings = std::make_unique<INISettingsObject>(configPath);
MinecraftInstance instance(m_globalSettings, std::move(instanceSettings), m_stagingPath);
auto mcVersion = m_pack.minecraft.version;
// Hack to correct some 'special sauce'...