summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-14 19:59:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-14 19:59:06 +0300
commitdad59528ccd770301b29c7db8148ff8ab8e89c92 (patch)
treeb93aa1b9149ddf20d6317d44cf924be8d0be276a /plugins/Clist_modern
parent1a3f9ca88310cb9080a4c0073087bebc4c1e3a0a (diff)
reverse iterators for LIST<>
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/modern_aniavatars.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp
index 2e3686782f..bc72629674 100644
--- a/plugins/Clist_modern/src/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/src/modern_aniavatars.cpp
@@ -265,11 +265,10 @@ static void _AniAva_ResumePainting()
static void _AniAva_ReduceAvatarImages(int startY, int dY, BOOL bDestroyWindow)
{
- for (int i = s_Objects.getCount() - 1; i >= 0; i--) {
- ANIAVA_OBJECT &pai = s_Objects[i];
- int res = SendMessage(pai.hWindow, AAM_REMOVEAVATAR, (WPARAM)startY, (LPARAM)dY);
+ for (auto &it : s_Objects.rev_iter()) {
+ int res = SendMessage(it->hWindow, AAM_REMOVEAVATAR, (WPARAM)startY, (LPARAM)dY);
if (res == 0xDEAD && bDestroyWindow)
- s_Objects.remove(i);
+ s_Objects.remove(it);
}
}