summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/history.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Popup/src/history.cpp')
-rw-r--r--plugins/Popup/src/history.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp
index 3bad370778..163fea25bb 100644
--- a/plugins/Popup/src/history.cpp
+++ b/plugins/Popup/src/history.cpp
@@ -61,8 +61,8 @@ void PopupHistoryLoad()
void PopupHistoryUnload()
{
- for (int i = 0; i < arPopupHistory.getCount(); ++i)
- FreeHistoryItem(arPopupHistory[i]);
+ for (auto &it : arPopupHistory)
+ FreeHistoryItem(it);
arPopupHistory.destroy();
}
@@ -127,7 +127,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara
{
oldWidth = 0;
HWND hwndList = GetDlgItem(hwnd, IDC_POPUP_LIST);
- for (int i = 0; i < arPopupHistory.getCount(); ++i)
+ for (auto &it : arPopupHistory)
ListBox_SetItemData(hwndList, ListBox_AddString(hwndList, L""), 0);
Window_SetIcon_IcoLib(hwnd, GetIconHandle(IDI_HISTORY));
@@ -178,8 +178,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara
ieEvent.codepage = 0;
ieEvent.pszProto = nullptr;
- for (int i = 0; i < arPopupHistory.getCount(); ++i) {
- POPUPDATA2* ppd = arPopupHistory[i];
+ for (auto &ppd : arPopupHistory) {
ieData.cbSize = sizeof(ieData);
ieData.iType = IEED_EVENT_SYSTEM;
ieData.dwFlags = 0;