summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_skinengine.cpp
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/modern_skinengine.cpp
parenta243c59835182e2a1fa91d9c7bd80defea88e4e8 (diff)
LIST::remove + LIST::indexOf() combination removed with LIST::removeItem
Diffstat (limited to 'plugins/Clist_modern/src/modern_skinengine.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp8
1 files changed, 3 insertions, 5 deletions
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));
}
}
}