diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:33:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | ba75602b16e4b9b484c2c05f70c117f612c81e1d (patch) | |
tree | c19e7066ece1d545437bd8482af888660e54e0d8 /plugins/Popup/src/opt_class.cpp | |
parent | 95ce21d8512af00a4c5f607091a459b789f79b79 (diff) |
Popup+: C++'11 iterators
Diffstat (limited to 'plugins/Popup/src/opt_class.cpp')
-rw-r--r-- | plugins/Popup/src/opt_class.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 1b7cf2b05c..582fddbe55 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -181,9 +181,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l ImageList_ReplaceIcon(hImgLst, -1, LoadIconEx(IDI_OPT_GROUP));
TreeView_SetImageList(hwndTree, hImgLst, TVSIL_NORMAL);
- for (int i = 0; i < gTreeData.getCount(); ++i) {
- POPUPTREEDATA *p = gTreeData[i];
-
+ for (auto &p : gTreeData) {
wchar_t itemName[MAXMODULELABELLENGTH];
int iconIndex;
@@ -438,8 +436,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_RESET:
- for (int i = 0; i < gTreeData.getCount(); ++i) {
- POPUPTREEDATA *p = gTreeData[i];
+ for (auto &p : gTreeData) {
switch (p->typ) {
case 1:
LoadNotificationSettings(p, "PopupNotifications");
@@ -453,8 +450,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l return TRUE;
case PSN_APPLY:
- for (int i = 0; i < gTreeData.getCount(); ++i) {
- POPUPTREEDATA *p = gTreeData[i];
+ for (auto &p : gTreeData) {
switch (p->typ) {
case 1:
p->notification.iSeconds = p->timeoutValue;
|