summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/classPsTree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTree.cpp')
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index 2237cd4eaa..30fef64b68 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -572,23 +572,13 @@ void CPsTree::DBResetState()
if (!Settings.EnumSettings(NULL, MODNAME))
{
- int i;
- LPSTR s;
- LPCSTR p;
- INT_PTR c;
-
- p = (_pPs->pszProto[0]) ? _pPs->pszProto : "Owner";
- c = mir_strlen(p);
-
- for (i = 0; i < Settings.getCount(); i++)
- {
- s = Settings[i];
+ LPCSTR p = (_pPs->pszProto[0]) ? _pPs->pszProto : "Owner";
+ size_t c = mir_strlen(p);
+ for (auto &s : Settings)
if (s && *s == '{' && !mir_strncmpi(s + 1, p, c))
- {
db_unset(NULL, MODNAME, s);
- }
- }
+
// keep only these flags
_dwFlags &= PSTVF_SORTTREE|PSTVF_GROUPS;
}