summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/src/ttbopt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TopToolBar/src/ttbopt.cpp')
-rw-r--r--plugins/TopToolBar/src/ttbopt.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/TopToolBar/src/ttbopt.cpp b/plugins/TopToolBar/src/ttbopt.cpp
index 843db24ac6..27d1b36b2a 100644
--- a/plugins/TopToolBar/src/ttbopt.cpp
+++ b/plugins/TopToolBar/src/ttbopt.cpp
@@ -61,8 +61,8 @@ static int BuildTree(HWND hwndDlg)
if (Buttons.getCount() == 0)
return FALSE;
- for (int i = 0; i < Buttons.getCount(); i++)
- AddLine(hTree, Buttons[i], TVI_LAST, dat->himlButtonIcons);
+ for (auto &it : Buttons)
+ AddLine(hTree, it, TVI_LAST, dat->himlButtonIcons);
return TRUE;
}
@@ -95,9 +95,8 @@ static void SaveTree(HWND hwndDlg)
}
{
mir_cslock lck(csButtonsHook);
- for (int i=0; i < Buttons.getCount(); i++)
- delete Buttons[i];
-
+ for (auto &it : Buttons)
+ delete it;
Buttons = tmpList;
}
SaveAllButtonsOptions();
@@ -128,8 +127,7 @@ static void RecreateWindows()
{
{
mir_cslock lck(csButtonsHook);
- for (int i = 0; i < Buttons.getCount(); i++) {
- TopButtonInt *b = Buttons[i];
+ for (auto &b : Buttons) {
if (b->hwnd) {
if (g_ctrl->bHardUpdate) {
DestroyWindow(b->hwnd);