From 4c281b28075dfa69d8cc2301b06492fbddb62f24 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 30 Jan 2020 20:18:37 +0300 Subject: LIST::remove + LIST::indexOf() combination removed with LIST::removeItem --- plugins/Popup/src/popup_thread.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/Popup/src') diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp index 183014a76f..d6fa27d649 100644 --- a/plugins/Popup/src/popup_thread.cpp +++ b/plugins/Popup/src/popup_thread.cpp @@ -179,12 +179,9 @@ static LRESULT CALLBACK PopupThreadManagerWndProc(HWND hwnd, UINT message, WPARA break; case UTM_REMOVE_WINDOW: - { - auto T = popupList.rev_iter(); - for (auto &it : T) - if (it == wnd) - popupList.remove(T.indexOf(&it)); - } + for (auto &it : popupList.rev_iter()) + if (it == wnd) + popupList.removeItem(&it); RepositionPopups(); --nPopups; -- cgit v1.2.3