diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-05 19:59:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-05 19:59:39 +0300 |
commit | d941a14f29d763514ee6b1005a448bb89942a5c6 (patch) | |
tree | 6258a325339c9e0dd38675f1c0e35bca89bd559b /src/core/stdmsg | |
parent | 5832cd9772395d3bad8cd64a3ffe0f4d0e028b60 (diff) |
code cleaning
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 2b4089342a..d7fb376c39 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -262,15 +262,15 @@ class COptMainDlg : public CDlgBase tvis.hParent = hParent; tvis.hInsertAfter = TVI_LAST; tvis.item.mask = TVIF_TEXT | TVIF_STATE; - for (int i = 0; i < nValues; i++) { - tvis.item.pszText = TranslateW(branch[i].szDescr); + for (int i = 0; i < nValues; i++, branch++) { + tvis.item.pszText = TranslateW(branch->szDescr); tvis.item.stateMask = TVIS_STATEIMAGEMASK; - if (branch[i].iMode) - iState = ((db_get_dw(0, CHAT_MODULE, branch[i].szDBName, defaultval)&branch[i].iMode) & branch[i].iMode) != 0 ? 2 : 1; + if (branch->iMode) + iState = ((db_get_dw(0, CHAT_MODULE, branch->szDBName, defaultval) & branch->iMode) & branch->iMode) != 0 ? 2 : 1; else - iState = db_get_b(0, CHAT_MODULE, branch[i].szDBName, branch[i].bDefault) != 0 ? 2 : 1; + iState = db_get_b(0, CHAT_MODULE, branch->szDBName, branch->bDefault) != 0 ? 2 : 1; tvis.item.state = INDEXTOSTATEIMAGEMASK(iState); - branch[i].hItem = checkBoxes.InsertItem(&tvis); + branch->hItem = checkBoxes.InsertItem(&tvis); } } @@ -280,18 +280,18 @@ class COptMainDlg : public CDlgBase TVITEMEX tvi; tvi.mask = TVIF_HANDLE | TVIF_STATE; - for (int i = 0; i < nValues; i++) { - tvi.hItem = branch[i].hItem; + for (int i = 0; i < nValues; i++, branch++) { + tvi.hItem = branch->hItem; checkBoxes.GetItem(&tvi); BYTE bChecked = (((tvi.state & TVIS_STATEIMAGEMASK) >> 12) == 1) ? 0 : 1; - if (branch[i].iMode) { + if (branch->iMode) { if (bChecked) - iState |= branch[i].iMode; + iState |= branch->iMode; if (iState & GC_EVENT_ADDSTATUS) iState |= GC_EVENT_REMOVESTATUS; - db_set_dw(0, CHAT_MODULE, branch[i].szDBName, (DWORD)iState); + db_set_dw(0, CHAT_MODULE, branch->szDBName, (DWORD)iState); } - else db_set_b(0, CHAT_MODULE, branch[i].szDBName, bChecked); + else db_set_b(0, CHAT_MODULE, branch->szDBName, bChecked); } } |