diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-26 11:30:13 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-26 11:30:21 +0300 |
commit | b68ca2a7e1035ecceb09fc1efe7529d5d8c989bf (patch) | |
tree | cb23a3a4faa8e890a072085cc625fb93b4a01892 /plugins/UserInfoEx/src | |
parent | de4efd42afb991d26104aa37b8a4aa97ef7b5703 (diff) |
warning fixes
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r-- | plugins/UserInfoEx/src/classPsTreeItem.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_annivedit.cpp | 6 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_refreshci.cpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 6e88f8d7cb..aac56ca1bd 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -426,7 +426,7 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) // load custom order
if (!(pPsh->_dwFlags & PSTVF_SORTTREE)) {
_iPosition = (int)g_plugin.getByte(PropertyKey(SET_ITEM_POS), odp->position);
- if ((_iPosition < 0) && (_iPosition > 0x800000A))
+ if ((_iPosition < 0) || (_iPosition > 0x800000A))
_iPosition = 0;
}
// read visibility state
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index 612a6fe0a1..a7fdec5079 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -187,10 +187,8 @@ MAnnivDate* CAnnivEditCtrl::FindDateById(const WORD wId) **/
INT_PTR CAnnivEditCtrl::AddDate(MAnnivDate &mda)
{
- MAnnivDate *pmda, **pmd;
-
// if a date with wID exists, replace it
- if ((pmda = FindDateById(mda.Id())) != nullptr) {
+ if (MAnnivDate *pmda = FindDateById(mda.Id())) {
BYTE bChanged = pmda->IsChanged(),
bRemindChanged = pmda->IsReminderChanged();
@@ -209,7 +207,7 @@ INT_PTR CAnnivEditCtrl::AddDate(MAnnivDate &mda) if (mda.Id() == ANID_NONE)
mda.Id(_numDates - 1);
- if (pmd = (MAnnivDate **)mir_realloc(_pDates, (_numDates + 1) * sizeof(pmda))) {
+ if (MAnnivDate **pmd = (MAnnivDate **)mir_realloc(_pDates, (_numDates + 1) * sizeof(MAnnivDate *))) {
_pDates = pmd;
if (_pDates[_numDates] = new MAnnivDate(mda)) {
_numDates++;
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 9b28bfe730..b5d3ebaab9 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -199,7 +199,7 @@ public: _bBBCode = FALSE;
}
- ~CUpdProgress()
+ virtual ~CUpdProgress()
{
}
|