From 62a9d13948e6e299d41eb6876c0f1fbaf0160d79 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Thu, 21 Jan 2021 19:31:05 +0100 Subject: Remove unused priority-related functions from Profile. --- src/profile.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/profile.cpp') 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 > 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 QListendArray(); } -int Profile::getPriorityMinimum() const -{ - return m_ModIndexByPriority.begin()->first; -} - bool Profile::forcedLibrariesEnabled(const QString &executable) const { return setting("forced_libraries", executable + "/enabled", false).toBool(); -- cgit v1.3.1