diff options
| -rw-r--r-- | src/profile.cpp | 18 | ||||
| -rw-r--r-- | src/profile.h | 11 |
2 files changed, 1 insertions, 28 deletions
diff --git a/src/profile.cpp b/src/profile.cpp index c45ecd30..caea776c 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -600,17 +600,6 @@ std::vector<std::tuple<QString, QString, int> > Profile::getActiveMods() return result; } - -unsigned int Profile::modIndexByPriority(int priority) const -{ - try { - return m_ModIndexByPriority.at(priority); - } catch (std::out_of_range) { - throw MyException(tr("invalid priority %1").arg(priority)); - } -} - - void Profile::setModEnabled(unsigned int index, bool enabled) { if (index >= m_ModStatus.size()) { @@ -698,7 +687,7 @@ bool Profile::setModPriority(unsigned int index, int &newPriority) return false; } - for (auto& [priority, index] : m_ModIndexByPriority) { + for (const auto& [priority, index] : m_ModIndexByPriority) { if (newPriority < oldPriority && priority >= newPriority && priority < oldPriority) { m_ModStatus.at(index).m_Priority += 1; } @@ -1085,11 +1074,6 @@ void Profile::storeSettingsByArray(const QString &prefix, const QList<QVariantMa m_Settings->endArray(); } -int Profile::getPriorityMinimum() const -{ - return m_ModIndexByPriority.begin()->first; -} - bool Profile::forcedLibrariesEnabled(const QString &executable) const { return setting("forced_libraries", executable + "/enabled", false).toBool(); diff --git a/src/profile.h b/src/profile.h index 903a8553..d354dd48 100644 --- a/src/profile.h +++ b/src/profile.h @@ -262,15 +262,6 @@ public: size_t numMods() const { return m_ModStatus.size(); } /** - * @brief retrieve the mod index based on the priority - * - * @param priority priority to look up - * @return the index of the mod - * @throw std::exception an exception is thrown if there is no mod with the specified priority - **/ - unsigned int modIndexByPriority(int priority) const; - - /** * @brief enable or disable a mod * * @param index index of the mod to enable/disable @@ -333,8 +324,6 @@ public: QList<QVariantMap> settingsByArray(const QString &prefix) const; void storeSettingsByArray(const QString &prefix, const QList<QVariantMap> &values); - int getPriorityMinimum() const; - bool forcedLibrariesEnabled(const QString &executable) const; void setForcedLibrariesEnabled(const QString &executable, bool enabled); QList<MOBase::ExecutableForcedLoadSetting> determineForcedLibraries(const QString &executable) const; |
