summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-01-30 20:18:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-01-30 20:18:46 +0300
commit4c281b28075dfa69d8cc2301b06492fbddb62f24 (patch)
treeb788f37caaff5063fd36eecad191d2a5582be12c /plugins/Clist_modern/src
parenta243c59835182e2a1fa91d9c7bd80defea88e4e8 (diff)
LIST::remove + LIST::indexOf() combination removed with LIST::removeItem
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r--plugins/Clist_modern/src/modern_aniavatars.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_xptheme.cpp10
3 files changed, 8 insertions, 12 deletions
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp
index 191d11d6ec..cc93b0d16c 100644
--- a/plugins/Clist_modern/src/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/src/modern_aniavatars.cpp
@@ -269,7 +269,7 @@ static void _AniAva_ReduceAvatarImages(int startY, int dY, BOOL bDestroyWindow)
for (auto &it : T) {
int res = SendMessage(it->hWindow, AAM_REMOVEAVATAR, (WPARAM)startY, (LPARAM)dY);
if (res == 0xDEAD && bDestroyWindow)
- s_Objects.remove(T.indexOf(&it));
+ s_Objects.removeItem(&it);
}
}
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index cbc0a3ccae..427ac780d5 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -525,10 +525,9 @@ int ske_ReleaseBufferDC(HDC hDC, int keepTime)
{
DWORD dwCurrentTime = GetTickCount();
- //Try to find DC in buffer list - set flag to be release after time;
+ // Try to find DC in buffer list - set flag to be release after time;
mir_cslock lck(BufferListCS);
- auto T = BufferList.rev_iter();
- for (auto &it : T) {
+ for (auto &it : BufferList.rev_iter()) {
if (it) {
if (hDC != nullptr && it->hDC == hDC) {
it->dwDestroyAfterTime = dwCurrentTime + keepTime;
@@ -539,8 +538,7 @@ int ske_ReleaseBufferDC(HDC hDC, int keepTime)
SelectObject(it->hDC, it->oldBitmap);
DeleteObject(it->hBitmap);
DeleteDC(it->hDC);
- mir_free(it);
- BufferList.remove(T.indexOf(&it));
+ mir_free(BufferList.removeItem(&it));
}
}
}
diff --git a/plugins/Clist_modern/src/modern_xptheme.cpp b/plugins/Clist_modern/src/modern_xptheme.cpp
index bff9e8a7fb..2c341149c9 100644
--- a/plugins/Clist_modern/src/modern_xptheme.cpp
+++ b/plugins/Clist_modern/src/modern_xptheme.cpp
@@ -72,12 +72,10 @@ void xpt_FreeThemeHandle(XPTHANDLE xptHandle)
void xpt_FreeThemeForWindow(HWND hwnd)
{
mir_cslock lck(xptCS);
- auto T = xptObjectList.rev_iter();
- for (auto &xptObject : T)
- if (xptObject->hOwnerWindow == hwnd) {
- _sttXptCloseThemeData(xptObject);
- xptObjectList.remove(T.indexOf(&xptObject));
- }
+
+ for (auto &xptObject : xptObjectList.rev_iter())
+ if (xptObject->hOwnerWindow == hwnd)
+ _sttXptCloseThemeData(xptObjectList.removeItem(&xptObject));
}
void xpt_OnWM_THEMECHANGED()