diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:35:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 058282527241fe458a1aae28d565a727dcc1a811 (patch) | |
tree | 7b5d5a1a5abe8052cd9879af19135df5f58a363d /plugins/UserInfoEx/src/classPsTree.cpp | |
parent | 429c0d0524e7197a593209468fef530344f5ee05 (diff) |
UInfoEx: C++'11 iterators
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTree.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTree.cpp | 18 |
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; } |