diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:27 +0300 |
commit | 391980ce1e890445542441eeb5d9f9cc18ae1baf (patch) | |
tree | ee1b165175dcdaeeaabd2ddb822542e648663a90 /plugins/BasicHistory/src | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'plugins/BasicHistory/src')
-rw-r--r-- | plugins/BasicHistory/src/BasicHistory.cpp | 6 | ||||
-rw-r--r-- | plugins/BasicHistory/src/Options.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 9240b619aa..3b0723658f 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -173,9 +173,9 @@ void InitIcolib() HICON LoadIconEx(int iconId, bool big)
{
- for (int i = 0; i < _countof(iconList); i++)
- if (iconList[i].defIconID == iconId)
- return IcoLib_GetIconByHandle(iconList[i].hIcolib, big);
+ for (auto &it : iconList)
+ if (it.defIconID == iconId)
+ return IcoLib_GetIconByHandle(it.hIcolib, big);
return nullptr;
}
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 900ff701a1..6df06b59b0 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -866,8 +866,8 @@ INT_PTR CALLBACK Options::DlgProcOptsMain(HWND hwndDlg, UINT msg, WPARAM wParam, HWND ftpLog = GetDlgItem(hwndDlg, IDC_WINSCPLOG);
ComboBox_AddString(events, TranslateT("Incoming events"));
ComboBox_AddString(events, TranslateT("Outgoing events"));
- for (int i = 0; i < _countof(EventNames); ++i)
- ComboBox_AddString(events, TranslateW(EventNames[i].name));
+ for (auto &it : EventNames)
+ ComboBox_AddString(events, TranslateW(it.name));
ComboBox_AddString(defFilter, TranslateT("Default history events"));
ComboBox_AddString(defFilter, TranslateT("All events"));
|