summaryrefslogtreecommitdiff
path: root/plugins/YAPP/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-21 18:40:14 +0300
commit477a6ea70d0bb1b1dfe9cbd9a15b6dad0284ddeb (patch)
tree247eed13a5231c3983e343f0b7fc2a95012353c2 /plugins/YAPP/src
parent9d0174ebe2bd005418855b18f737c36d5c20ab4a (diff)
all another C++'11 iterators
Diffstat (limited to 'plugins/YAPP/src')
-rw-r--r--plugins/YAPP/src/options.cpp3
-rw-r--r--plugins/YAPP/src/services.cpp10
2 files changed, 6 insertions, 7 deletions
diff --git a/plugins/YAPP/src/options.cpp b/plugins/YAPP/src/options.cpp
index 423299490d..10da330778 100644
--- a/plugins/YAPP/src/options.cpp
+++ b/plugins/YAPP/src/options.cpp
@@ -451,8 +451,7 @@ static INT_PTR CALLBACK DlgProcOptsClasses(HWND hwndDlg, UINT msg, WPARAM wParam
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
arClasses = arNewClasses;
char setting[256];
- for (int i = 0; i < arClasses.getCount(); i++) {
- POPUPCLASS *pc = arClasses[i];
+ for (auto &pc : arClasses) {
mir_snprintf(setting, "%s/Timeout", pc->pszName);
db_set_w(0, MODULE, setting, pc->iSeconds);
mir_snprintf(setting, "%s/TextCol", pc->pszName);
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp
index 71f68a7b05..87ef273df9 100644
--- a/plugins/YAPP/src/services.cpp
+++ b/plugins/YAPP/src/services.cpp
@@ -381,9 +381,9 @@ static INT_PTR CreateClassPopup(WPARAM wParam, LPARAM lParam)
if (wParam)
pc = (POPUPCLASS *)wParam;
else {
- for (int i = 0; i < arClasses.getCount(); i++) {
- if (mir_strcmp(arClasses[i]->pszName, pdc->pszClassName) == 0) {
- pc = arClasses[i];
+ for (auto &it : arClasses) {
+ if (mir_strcmp(it->pszName, pdc->pszClassName) == 0) {
+ pc = it;
break;
}
}
@@ -446,6 +446,6 @@ void DeinitServices()
{
DestroyHookableEvent(hEventNotify);
- for (int i = 0; i < arClasses.getCount(); i++)
- FreePopupClass(arClasses[i]);
+ for (auto &it : arClasses)
+ FreePopupClass(it);
}