mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Added a 'const' version of cTimers::GetTimer()
This commit is contained in:
11
timers.c
11
timers.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: timers.c 4.5 2015/09/13 13:10:24 kls Exp $
|
||||
* $Id: timers.c 4.6 2016/12/22 14:24:44 kls Exp $
|
||||
*/
|
||||
|
||||
#include "timers.h"
|
||||
@@ -748,9 +748,9 @@ const cTimer *cTimers::GetById(int Id) const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cTimer *cTimers::GetTimer(cTimer *Timer)
|
||||
const cTimer *cTimers::GetTimer(const cTimer *Timer) const
|
||||
{
|
||||
for (cTimer *ti = First(); ti; ti = Next(ti)) {
|
||||
for (const cTimer *ti = First(); ti; ti = Next(ti)) {
|
||||
if (!ti->Remote() &&
|
||||
ti->Channel() == Timer->Channel() &&
|
||||
(ti->WeekDays() && ti->WeekDays() == Timer->WeekDays() || !ti->WeekDays() && ti->Day() == Timer->Day()) &&
|
||||
@@ -761,6 +761,11 @@ cTimer *cTimers::GetTimer(cTimer *Timer)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cTimer *cTimers::GetTimer(const cTimer *Timer)
|
||||
{
|
||||
return (cTimer *)GetTimer(Timer);
|
||||
}
|
||||
|
||||
const cTimer *cTimers::GetMatch(time_t t) const
|
||||
{
|
||||
static int LastPending = -1;
|
||||
|
||||
Reference in New Issue
Block a user