diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-21 19:31:05 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-21 19:31:05 +0100 |
| commit | 62a9d13948e6e299d41eb6876c0f1fbaf0160d79 (patch) | |
| tree | f13f2acd65fe10536e1d4eb069428032d8da6b1c /src/profile.cpp | |
| parent | 36489c7d8fd6f1b79f29edc5d1f6c2d8b231adf9 (diff) | |
Remove unused priority-related functions from Profile.
Diffstat (limited to 'src/profile.cpp')
| -rw-r--r-- | src/profile.cpp | 18 |
1 files changed, 1 insertions, 17 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(); |
