From 391980ce1e890445542441eeb5d9f9cc18ae1baf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2018 22:31:20 +0300 Subject: code optimization --- protocols/Twitter/src/ui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/Twitter/src/ui.cpp') 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(sites[i])); + for (auto &it : sites) + SendDlgItemMessage(hwndDlg, IDC_SERVER, CB_ADDSTRING, 0, reinterpret_cast(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(sites[i])); + for (auto &it : sites) + SendDlgItemMessage(hwndDlg, IDC_BASEURL, CB_ADDSTRING, 0, reinterpret_cast(it)); if (!proto->getString(TWITTER_KEY_BASEURL, &dbv)) { SetDlgItemTextA(hwndDlg, IDC_BASEURL, dbv.pszVal); -- cgit v1.2.3