diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch) | |
tree | 247eed13a5231c3983e343f0b7fc2a95012353c2 /plugins/TopToolBar/src/ttbopt.cpp | |
parent | 9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff) |
all another C++'11 iterators
Diffstat (limited to 'plugins/TopToolBar/src/ttbopt.cpp')
-rw-r--r-- | plugins/TopToolBar/src/ttbopt.cpp | 12 |
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);
|