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 /protocols/Twitter/src/ui.cpp | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'protocols/Twitter/src/ui.cpp')
-rw-r--r-- | protocols/Twitter/src/ui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index a94395829a..d7164be99e 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -50,8 +50,8 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM db_free(&dbv);
}
- for (size_t i = 0; i < _countof(sites); i++)
- SendDlgItemMessage(hwndDlg, IDC_SERVER, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(sites[i]));
+ for (auto &it : sites)
+ SendDlgItemMessage(hwndDlg, IDC_SERVER, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(it));
if (!proto->getString(TWITTER_KEY_BASEURL, &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_SERVER, dbv.pszVal);
@@ -180,8 +180,8 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar CheckDlgButton(hwndDlg, IDC_CHATFEED, proto->getByte(TWITTER_KEY_CHATFEED) ? BST_CHECKED : BST_UNCHECKED);
- for (size_t i = 0; i < _countof(sites); i++)
- SendDlgItemMessage(hwndDlg, IDC_BASEURL, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(sites[i]));
+ for (auto &it : sites)
+ SendDlgItemMessage(hwndDlg, IDC_BASEURL, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(it));
if (!proto->getString(TWITTER_KEY_BASEURL, &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_BASEURL, dbv.pszVal);
|