summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/classPsTree.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:35:40 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit058282527241fe458a1aae28d565a727dcc1a811 (patch)
tree7b5d5a1a5abe8052cd9879af19135df5f58a363d /plugins/UserInfoEx/src/classPsTree.cpp
parent429c0d0524e7197a593209468fef530344f5ee05 (diff)
UInfoEx: C++'11 iterators
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;
}