diff options
Diffstat (limited to 'plugins/UserInfoEx/src/ctrl_annivedit.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_annivedit.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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++;
|