Simplify recur_apoint_switch_notify()

Pass the recurrent appointment itself instead of passing a date and an
item number. This is quite simple as we can just pass the pointer that
is contained in the generic item structure and don't have to
LLIST_TS_FIND_*() the item first any more.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2012-06-25 12:04:45 +02:00
parent 52bfc54333
commit 80e24954c2
3 changed files with 3 additions and 11 deletions

View File

@@ -560,7 +560,7 @@ void apoint_switch_notify(void)
date = calendar_get_slctd_day_sec();
if (p->type == RECUR_APPT) {
recur_apoint_switch_notify(date, p->appt_pos);
recur_apoint_switch_notify(p->item.rapt);
return;
} else if (p->type == APPT)
apoint_nb = day_item_nb(date, hilt, APPT);