summaryrefslogtreecommitdiffstats
path: root/logic/BaseInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-23 16:07:47 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-23 16:07:47 +0200
commitce99fabe1396ed2956dc7ecb468760ef88f98765 (patch)
tree603f7c6f1a0f27805b21843ec3f829354ad0ff77 /logic/BaseInstance.cpp
parent0e0ddf5494ab4a264b0dc18c4b94809844300dc0 (diff)
downloadMultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar.gz
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar.lz
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar.xz
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.zip
GH-992 Add a transaction/locking mechanism to settings objects
This can cut the FTB loading by ~66% - worth it, but not ideal. Real solution will have to be implemented later.
Diffstat (limited to 'logic/BaseInstance.cpp')
-rw-r--r--logic/BaseInstance.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index e048f475..661e4587 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -95,9 +95,9 @@ InstancePtr BaseInstance::getSharedPtr()
return shared_from_this();
}
-SettingsObject &BaseInstance::settings() const
+SettingsObjectPtr BaseInstance::settings() const
{
- return *m_settings;
+ return m_settings;
}
BaseInstance::InstanceFlags BaseInstance::flags() const
@@ -212,5 +212,5 @@ QString BaseInstance::windowTitle() const
QStringList BaseInstance::extraArguments() const
{
- return Util::Commandline::splitArgs(settings().get("JvmArgs").toString());
+ return Util::Commandline::splitArgs(settings()->get("JvmArgs").toString());
}