summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_opttree.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-09 19:32:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-09 19:32:39 +0300
commitdf6b0c988eb26339d4c7e4a1d0fe3b9717703c28 (patch)
tree5b4960edd6c9186e1fbc14f83f7f08a6a842f0a7 /protocols/JabberG/src/jabber_opttree.cpp
parent303dd9297732fc943ed3e20ab37587f0c009dfe5 (diff)
more loop-related code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_opttree.cpp')
-rw-r--r--protocols/JabberG/src/jabber_opttree.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_opttree.cpp b/protocols/JabberG/src/jabber_opttree.cpp
index 047decb2be..c9ad4ba465 100644
--- a/protocols/JabberG/src/jabber_opttree.cpp
+++ b/protocols/JabberG/src/jabber_opttree.cpp
@@ -175,10 +175,10 @@ void CCtrlTreeOpts::OnApply()
{
CCtrlTreeView::OnApply();
- for (int i = 0; i < m_options.getCount(); i++) {
+ for (auto &it : m_options) {
TVITEMEX tvi;
- GetItem(m_options[i]->m_hItem, &tvi);
- *m_options[i]->m_option = ((tvi.iImage == IMG_CHECK) || (tvi.iImage == IMG_RCHECK)) ? 1 : 0;
+ GetItem(it->m_hItem, &tvi);
+ *it->m_option = ((tvi.iImage == IMG_CHECK) || (tvi.iImage == IMG_RCHECK)) ? 1 : 0;
}
}
@@ -208,11 +208,11 @@ void CCtrlTreeOpts::ProcessItemClick(HTREEITEM hti)
break;
case IMG_NORCHECK:
- for (int i = 0; i < m_options.getCount(); i++) {
- if (m_options[i]->m_groupId == m_options[tvi.lParam]->m_groupId) {
+ for (auto &it : m_options) {
+ if (it->m_groupId == m_options[tvi.lParam]->m_groupId) {
TVITEMEX tvi_tmp;
tvi_tmp.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi_tmp.hItem = m_options[i]->m_hItem;
+ tvi_tmp.hItem = it->m_hItem;
tvi_tmp.iImage = tvi_tmp.iSelectedImage = IMG_NORCHECK;
SetItem(&tvi_tmp);
}