diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-08-08 06:57:14 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-08-08 06:57:14 +0000 |
commit | 4a0631399b72ff7a62ffc2da69150551e990e0d9 (patch) | |
tree | 636747c4083923dc96ebb8f0d06019746493b0da /plugins/UserInfoEx/src/classPsTree.cpp | |
parent | 88a14e8dc56bb77b09e52c8aebe5cd6f47039366 (diff) |
UserInfoEx:
- Warnings fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@14857 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTree.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTree.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp index 890af51d6c..b05f8961ab 100644 --- a/plugins/UserInfoEx/src/classPsTree.cpp +++ b/plugins/UserInfoEx/src/classPsTree.cpp @@ -837,12 +837,11 @@ void CPsTree::OnIconsChanged() BYTE CPsTree::OnInfoChanged() { PSHNOTIFY pshn; - int i; BYTE bChanged = 0; pshn.hdr.idFrom = 0; pshn.hdr.code = PSN_INFOCHANGED; - for (i = 0; i < _numItems; i++) { + for (int i = 0; i < _numItems; i++) { pshn.hdr.hwndFrom = _pItems[i]->Wnd(); if (pshn.hdr.hwndFrom != NULL) { pshn.lParam = (LPARAM)_pItems[i]->hContact(); @@ -922,11 +921,9 @@ void CPsTree::OnSelChanged(LPNMTREEVIEW lpnmtv) void CPsTree::OnCancel() { PSHNOTIFY pshn; - int i; - pshn.hdr.idFrom = 0; pshn.hdr.code = PSN_RESET; - for (i = 0; i < _numItems; i++) { + for (int i = 0; i < _numItems; i++) { pshn.hdr.hwndFrom = _pItems[i]->Wnd(); if (pshn.hdr.hwndFrom && (_pItems[i]->Flags() & PSPF_CHANGED)) { pshn.lParam = (LPARAM)_pItems[i]->hContact(); @@ -945,12 +942,10 @@ void CPsTree::OnCancel() int CPsTree::OnApply() { CPsTreeItem *pti = CurrentItem(); - PSHNOTIFY pshn; - int i; - if (pti == NULL) return 1; + PSHNOTIFY pshn; pshn.hdr.idFrom = 0; pshn.hdr.code = PSN_KILLACTIVE; pshn.hdr.hwndFrom = pti->Wnd(); @@ -958,12 +953,11 @@ int CPsTree::OnApply() return 1; // save everything to database pshn.hdr.code = PSN_APPLY; - for (i = 0; i < _numItems; i++) { + for (int i = 0; i < _numItems; i++) { if (_pItems[i] && _pItems[i]->Wnd() && _pItems[i]->Flags() & PSPF_CHANGED) { pshn.lParam = (LPARAM)_pItems[i]->hContact(); pshn.hdr.hwndFrom = _pItems[i]->Wnd(); if (SendMessage(pshn.hdr.hwndFrom, WM_NOTIFY, 0, (LPARAM)&pshn) == PSNRET_INVALID_NOCHANGEPAGE) { - CPsTreeItem *pti; if (pti = CurrentItem()) ShowWindow(pti->Wnd(), SW_HIDE); _curItem = i; |