summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/Options.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-02-23 21:28:06 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-02-23 21:28:06 +0000
commita8a5cfd818bcf099c5a0f5bd018d1d596a0d533b (patch)
tree10099d3253e06d291263553e587945991f89aaa9 /plugins/NewAwaySysMod/src/Options.cpp
parent5324ca994e91397adba4e620fe31459dc86e2e75 (diff)
-minor fixes for NewAwaySystem
git-svn-id: http://svn.miranda-ng.org/main/trunk@8239 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewAwaySysMod/src/Options.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/Options.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/NewAwaySysMod/src/Options.cpp b/plugins/NewAwaySysMod/src/Options.cpp
index 63f76fcd88..b1dff3580d 100644
--- a/plugins/NewAwaySysMod/src/Options.cpp
+++ b/plugins/NewAwaySysMod/src/Options.cpp
@@ -220,12 +220,11 @@ void COptItem_BitDBSetting::MemToDB(CString &sModule, CString *sDBSettingPrefix)
int COptItem_TreeCtrl::IDToOrder(int ID)
{
- int i;
- for (i = 0; i < RootItems.GetSize(); i++)
+ for (int i = 0; i < RootItems.GetSize(); i++)
if (RootItems[i].ID == ID)
return ROOT_INDEX_TO_ORDER(i);
- for (i = 0; i < Value.GetSize(); i++)
+ for (int i = 0; i < Value.GetSize(); i++)
if (Value[i].ID == ID)
return i;
@@ -234,12 +233,11 @@ int COptItem_TreeCtrl::IDToOrder(int ID)
int COptItem_TreeCtrl::hItemToOrder(HTREEITEM hItem)
{
- int i;
- for (i = 0; i < RootItems.GetSize(); i++)
+ for (int i = 0; i < RootItems.GetSize(); i++)
if (RootItems[i].hItem == hItem)
return ROOT_INDEX_TO_ORDER(i);
- for (i = 0; i < Value.GetSize(); i++)
+ for (int i = 0; i < Value.GetSize(); i++)
if (Value[i].hItem == hItem)
return i;
@@ -308,8 +306,7 @@ void COptItem_TreeCtrl::DBToMem(CString &sModule, CString *sDBSettingPrefix)
Value = DefValue;
}
else {
- int i;
- for (i = 0; i < Value.GetSize(); i++) {
+ for (int i = 0; i < Value.GetSize(); i++) {
if (Value[i].Title == NULL) {
Value.RemoveElem(i);
i--;
@@ -559,8 +556,7 @@ CTreeItem* COptItem_TreeCtrl::InsertItem(HWND hWnd, CTreeItem &Item)
}
}
tvIn.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM;
- tvIn.item.state = tvIn.item.stateMask = (Item.Flags & TIF_GROUP) ? (TVIS_BOLD |
- ((Item.Flags & TIF_EXPANDED) ? TVIS_EXPANDED : 0)) : 0;
+ tvIn.item.state = tvIn.item.stateMask = (Item.Flags & TIF_GROUP) ? (TVIS_BOLD | ((Item.Flags & TIF_EXPANDED) ? TVIS_EXPANDED : 0)) : 0;
if (TreeFlags & TREECTRL_FLAG_HAS_CHECKBOXES) {
tvIn.item.stateMask |= TVIS_STATEIMAGEMASK;
tvIn.item.state |= INDEXTOSTATEIMAGEMASK((Item.Flags & TIF_ENABLED) ? 2 : 1);