diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-30 20:18:37 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-30 20:18:46 +0300 |
commit | 4c281b28075dfa69d8cc2301b06492fbddb62f24 (patch) | |
tree | b788f37caaff5063fd36eecad191d2a5582be12c /plugins/Clist_modern/src/modern_skinengine.cpp | |
parent | a243c59835182e2a1fa91d9c7bd80defea88e4e8 (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.cpp | 8 |
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)); } } } |