summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/dlg_propsheet.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-26 22:31:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-26 22:31:27 +0300
commit391980ce1e890445542441eeb5d9f9cc18ae1baf (patch)
treeee1b165175dcdaeeaabd2ddb822542e648663a90 /plugins/UserInfoEx/src/dlg_propsheet.cpp
parentbf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff)
code optimization
Diffstat (limited to 'plugins/UserInfoEx/src/dlg_propsheet.cpp')
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 948b70dba8..3ab88e18a0 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -793,15 +793,15 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
static const WORD idMove[] = { IDC_PAGETITLE, IDC_PAGETITLEBG, IDC_PAGETITLEBG2, IDOK, IDCANCEL, IDAPPLY };
HWND hCtrl;
- for (int i = 0; i < _countof(idResize); i++) {
- if (hCtrl = GetDlgItem(hDlg, idResize[i])) {
+ for (auto &it : idResize) {
+ if (hCtrl = GetDlgItem(hDlg, it)) {
GetWindowRect(hCtrl, &rc);
OffsetRect(&rc, -pt.x, -pt.y);
MoveWindow(hCtrl, rc.left, rc.top, rc.right - rc.left + addWidth, rc.bottom - rc.top, FALSE);
}
}
- for (int k = 0; k < _countof(idMove); k++) {
- if (hCtrl = GetDlgItem(hDlg, idMove[k])) {
+ for (auto &it : idMove) {
+ if (hCtrl = GetDlgItem(hDlg, it)) {
GetWindowRect(hCtrl, &rc);
OffsetRect(&rc, -pt.x, -pt.y);
MoveWindow(hCtrl, rc.left + addWidth, rc.top, rc.right - rc.left, rc.bottom - rc.top, FALSE);