diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-15 15:33:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-15 15:34:09 +0300 |
commit | 44b60862c97e5ec855d2bacd4d15f81f7ae7f410 (patch) | |
tree | cfe6fd232fac8c80c2f7673804352b94187d698b /plugins/Clist_modern | |
parent | 0a03c7c9ccd36ce03bdb9feb4827314e4dd553c6 (diff) |
MUCH more effective way of removing records from iterators
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_aniavatars.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index bc72629674..c04448b182 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -265,10 +265,11 @@ static void _AniAva_ResumePainting() static void _AniAva_ReduceAvatarImages(int startY, int dY, BOOL bDestroyWindow)
{
- for (auto &it : s_Objects.rev_iter()) {
+ auto T = s_Objects.rev_iter();
+ for (auto &it : T) {
int res = SendMessage(it->hWindow, AAM_REMOVEAVATAR, (WPARAM)startY, (LPARAM)dY);
if (res == 0xDEAD && bDestroyWindow)
- s_Objects.remove(it);
+ s_Objects.remove(T.indexOf(&it));
}
}
|