diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-20 16:22:22 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-20 16:22:22 +0100 |
commit | 0c861db7a201c813530e703257f286257f39872f (patch) | |
tree | 5ba0e10632ecef461f50bcc6e32512062932a193 /launcher/minecraft/Component.cpp | |
parent | eafeb64decf9fa3b4ae9617abc777698e51b24d0 (diff) | |
download | PrismLauncher-0c861db7a201c813530e703257f286257f39872f.tar.gz PrismLauncher-0c861db7a201c813530e703257f286257f39872f.tar.bz2 PrismLauncher-0c861db7a201c813530e703257f286257f39872f.zip |
NOISSUE Some happy little refactors
Diffstat (limited to 'launcher/minecraft/Component.cpp')
-rw-r--r-- | launcher/minecraft/Component.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/launcher/minecraft/Component.cpp b/launcher/minecraft/Component.cpp index 92821065..385688d4 100644 --- a/launcher/minecraft/Component.cpp +++ b/launcher/minecraft/Component.cpp @@ -85,9 +85,9 @@ std::shared_ptr<class VersionFile> Component::getVersionFile() const std::shared_ptr<class Meta::VersionList> Component::getVersionList() const { // FIXME: what if the metadata index isn't loaded yet? - if(ENV.metadataIndex()->hasUid(m_uid)) + if(ENV->metadataIndex()->hasUid(m_uid)) { - return ENV.metadataIndex()->get(m_uid); + return ENV->metadataIndex()->get(m_uid); } return nullptr; } @@ -192,7 +192,7 @@ bool Component::isRevertible() { if (isCustom()) { - if(ENV.metadataIndex()->hasUid(m_uid)) + if(ENV->metadataIndex()->hasUid(m_uid)) { return true; } @@ -266,7 +266,7 @@ void Component::setVersion(const QString& version) // we don't have a file, therefore we are loaded with metadata m_cachedVersion = version; // see if the meta version is loaded - auto metaVersion = ENV.metadataIndex()->get(m_uid, version); + auto metaVersion = ENV->metadataIndex()->get(m_uid, version); if(metaVersion->isLoaded()) { // if yes, we can continue with that. @@ -350,7 +350,7 @@ bool Component::revert() m_file.reset(); // check local cache for metadata... - auto version = ENV.metadataIndex()->get(m_uid, m_version); + auto version = ENV->metadataIndex()->get(m_uid, m_version); if(version->isLoaded()) { m_metaVersion = version; |