summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
authorChris Bessent <lost.dragonist@gmail.com>2021-01-16 20:09:12 -0700
committerChris Bessent <lost.dragonist@gmail.com>2021-01-16 20:09:12 -0700
commite69cb90dbef5c5c82f9ae860ccbdeb7f034f885e (patch)
tree7322f85714ad891b17fbc40843025ee97ffa1cc1 /src/profile.cpp
parent3dbee687260a02fa523071ec3f351652cb386144 (diff)
Improve performance by changing the map to be case insensitive
Diffstat (limited to 'src/profile.cpp')
-rw-r--r--src/profile.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/profile.cpp b/src/profile.cpp
index 5a71cacb..3cc1a2a3 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -410,18 +410,9 @@ void Profile::refreshModStatus()
} else {
namesRead.insert(lookupName);
}
- unsigned int modIndex = ModInfo::findMod(
- [lookupName](ModInfo::Ptr info) {
- return info->name().compare(lookupName, Qt::CaseInsensitive) == 0;
- }
- );
+ unsigned int modIndex = ModInfo::getIndex(lookupName);
if (modIndex != UINT_MAX) {
ModInfo::Ptr info = ModInfo::getByIndex(modIndex);
- if (info->name().compare(lookupName) != 0) {
- // name in modlist.txt doesn't match case of actual folder
- // need to rewrite the modlist to fix this
- modStatusModified = true;
- }
if ((modIndex < m_ModStatus.size())
&& (info->getFixedPriority() == INT_MIN)) {
m_ModStatus[modIndex].m_Enabled = enabled;