From 477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Feb 2018 18:40:03 +0300 Subject: all another C++'11 iterators --- plugins/CSList/src/cslist.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/CSList/src') diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index d90e0181d4..2bc27345bb 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -106,8 +106,8 @@ static int OnCreateMenuItems(WPARAM, LPARAM) static int OnPreshutdown(WPARAM, LPARAM) { - for (int i = 0; i < arWindows.getCount(); i++) - DestroyWindow(arWindows[i]->m_handle); + for (auto &it : arWindows) + DestroyWindow(it->m_handle); return 0; } @@ -208,8 +208,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName) INT_PTR showList(WPARAM, LPARAM, LPARAM param) { char* szProto = (char*)param; - for (int i = 0; i < arWindows.getCount(); i++) { - CSWindow *p = arWindows[i]; + for (auto &p : arWindows) { if (!mir_strcmp(szProto, p->m_protoName)) { ShowWindow(p->m_handle, SW_SHOW); SetForegroundWindow(p->m_handle); -- cgit v1.2.3