mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
refactor!!!: migrate from shared pointers
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit 549405ab2f)
This commit is contained in:
parent
7755e0def9
commit
e89ce1124a
199 changed files with 742 additions and 710 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#include "settings/INISettingsObject.h"
|
||||
#include "tasks/Task.h"
|
||||
|
||||
InstanceCopyTask::InstanceCopyTask(InstancePtr origInstance, const InstanceCopyPrefs& prefs)
|
||||
InstanceCopyTask::InstanceCopyTask(BaseInstance* origInstance, const InstanceCopyPrefs& prefs)
|
||||
{
|
||||
m_origInstance = origInstance;
|
||||
m_keepPlaytime = prefs.isKeepPlaytimeEnabled();
|
||||
|
|
@ -146,9 +146,9 @@ void InstanceCopyTask::copyFinished()
|
|||
}
|
||||
|
||||
// FIXME: shouldn't this be able to report errors?
|
||||
auto instanceSettings = std::make_shared<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
||||
auto instanceSettings = std::make_unique<INISettingsObject>(FS::PathCombine(m_stagingPath, "instance.cfg"));
|
||||
|
||||
InstancePtr inst(new NullInstance(m_globalSettings, instanceSettings, m_stagingPath));
|
||||
BaseInstance* inst(new NullInstance(m_globalSettings, std::move(instanceSettings), m_stagingPath));
|
||||
inst->setName(name());
|
||||
inst->setIconKey(m_instIcon);
|
||||
if (!m_keepPlaytime) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue