From 396e63500ec189b003d36504bae91a2b6a78a69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 1 Jan 2014 15:08:40 +0100 Subject: Allow the use of synonyms in settings. Refactor settings. Remove a bunch of obsolete/unused code. --- logic/InstanceFactory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'logic/InstanceFactory.cpp') diff --git a/logic/InstanceFactory.cpp b/logic/InstanceFactory.cpp index 7c778035..1f1a5879 100644 --- a/logic/InstanceFactory.cpp +++ b/logic/InstanceFactory.cpp @@ -45,7 +45,7 @@ InstanceFactory::InstLoadError InstanceFactory::loadInstance(BaseInstance *&inst { auto m_settings = new INISettingsObject(PathCombine(instDir, "instance.cfg")); - m_settings->registerSetting(new Setting("InstanceType", "Legacy")); + m_settings->registerSetting("InstanceType", "Legacy"); QString inst_type = m_settings->get("InstanceType").toString(); @@ -94,7 +94,7 @@ InstanceFactory::InstCreateError InstanceFactory::createInstance(BaseInstance *& return InstanceFactory::NoSuchVersion; auto m_settings = new INISettingsObject(PathCombine(instDir, "instance.cfg")); - m_settings->registerSetting(new Setting("InstanceType", "Legacy")); + m_settings->registerSetting("InstanceType", "Legacy"); if (type == NormalInst) { @@ -171,7 +171,7 @@ InstanceFactory::InstCreateError InstanceFactory::copyInstance(BaseInstance *&ne return InstanceFactory::CantCreateDir; } auto m_settings = new INISettingsObject(PathCombine(instDir, "instance.cfg")); - m_settings->registerSetting(new Setting("InstanceType", "Legacy")); + m_settings->registerSetting("InstanceType", "Legacy"); QString inst_type = m_settings->get("InstanceType").toString(); if(inst_type == "OneSixFTB") -- cgit v1.2.3