diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-24 13:54:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-24 13:54:36 +0000 |
commit | b3efd156b2ded1777ee2b4522acba1fa2d666ca7 (patch) | |
tree | 7a14d93203f83e33e7100fb0f7e4e48c4831bb2e /plugins/Clist_nicer/src/clcitems.cpp | |
parent | 35b85950a7e144da1c1390e6cd5dcae5adea61bc (diff) |
group processing code standardization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16869 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/clcitems.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 5bcbdfd9ad..a73a0827e2 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -199,15 +199,18 @@ void RebuildEntireList(HWND hwnd, struct ClcData *dat) group->scanIndex = 0;
for (;;) {
if (group->scanIndex == group->cl.count) {
- group = group->parent;
- if (group == NULL)
+ if ((group = group->parent) == NULL)
break;
+ group->scanIndex++;
+ continue;
}
- else if (group->cl.items[group->scanIndex]->type == CLCIT_GROUP) {
- if (group->cl.items[group->scanIndex]->group->cl.count == 0)
- group = pcli->pfnRemoveItemFromGroup(hwnd, group, group->cl.items[group->scanIndex], 0);
+
+ ClcContact *cc = group->cl.items[group->scanIndex];
+ if (cc->type == CLCIT_GROUP) {
+ if (cc->group->cl.count == 0)
+ group = pcli->pfnRemoveItemFromGroup(hwnd, group, cc, 0);
else {
- group = group->cl.items[group->scanIndex]->group;
+ group = cc->group;
group->scanIndex = 0;
}
continue;
|