summaryrefslogtreecommitdiff
path: root/plugins/HistorySweeperLight/src/historysweeperlight.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistorySweeperLight/src/historysweeperlight.cpp')
-rw-r--r--plugins/HistorySweeperLight/src/historysweeperlight.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
index ad73c5d46c..65c37b0196 100644
--- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp
+++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp
@@ -224,9 +224,9 @@ int OnWindowEvent(WPARAM, LPARAM lParam)
SweepHistoryFromContact(msgEvData->hContact, Criteria, TRUE);
}
- for (int i = g_hWindows.getCount() - 1; i >= 0; i--)
- if (g_hWindows[i] == PVOID(msgEvData->hContact))
- g_hWindows.remove(i);
+ for (auto &it : g_hWindows.rev_iter())
+ if (it == PVOID(msgEvData->hContact))
+ g_hWindows.remove(it);
break;
}