diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-08-29 13:35:58 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-08-29 13:35:58 +0200 |
| commit | e421837ba00b7a6cbe9ace477836f067dca58828 (patch) | |
| tree | 3ae929e2c13dff6002748f992b495e168d5c6e21 /src/modlist.cpp | |
| parent | 600a4b3b14db8d7610757c852876641c49612864 (diff) | |
Remove check for alwaysEnabled() and log missing mods in ModList::setActive().
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index b093fd88..218604b2 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -952,6 +952,8 @@ bool ModList::setActive(const QString &name, bool active) { unsigned int modIndex = ModInfo::getIndex(name); if (modIndex == UINT_MAX) { + log::debug("Trying to {} mod {} which does not exist.", + active ? "enable" : "disable", name); return false; } else { m_Profile->setModEnabled(modIndex, active); @@ -970,13 +972,11 @@ int ModList::setActive(const QStringList& names, bool active) { for (const auto& name : names) { auto modIndex = ModInfo::getIndex(name); if (modIndex != UINT_MAX) { - - // This check is not done by the bulk Profile::setModsEnabled, so we - // do it here. - ModInfo::Ptr modInfo = ModInfo::getByIndex(modIndex); - if (!modInfo->alwaysEnabled()) { - indices.append(modIndex); - } + indices.append(modIndex); + } + else { + log::debug("Trying to {} mod {} which does not exist.", + active ? "enable" : "disable", name); } } |
