From 736f2fed426b3b3ca68a5ce808586ab16e5bb070 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 23 Dec 2016 09:49:31 +0100 Subject: [PATCH] Fixed the non-const version of cTimers::GetTimer() --- timers.c | 7 +------ timers.h | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/timers.c b/timers.c index e711e2e9..5bc11036 100644 --- a/timers.c +++ b/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.6 2016/12/22 14:24:44 kls Exp $ + * $Id: timers.c 4.7 2016/12/23 09:48:39 kls Exp $ */ #include "timers.h" @@ -761,11 +761,6 @@ const cTimer *cTimers::GetTimer(const cTimer *Timer) const return NULL; } -cTimer *cTimers::GetTimer(const cTimer *Timer) -{ - return (cTimer *)GetTimer(Timer); -} - const cTimer *cTimers::GetMatch(time_t t) const { static int LastPending = -1; diff --git a/timers.h b/timers.h index d87b57ad..7ee116c8 100644 --- a/timers.h +++ b/timers.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.h 4.5 2016/12/22 14:30:33 kls Exp $ + * $Id: timers.h 4.6 2016/12/23 09:49:31 kls Exp $ */ #ifndef __TIMERS_H @@ -171,7 +171,7 @@ public: const cTimer *GetById(int Id) const; cTimer *GetById(int Id) { return const_cast(static_cast(this)->GetById(Id)); }; const cTimer *GetTimer(const cTimer *Timer) const; - cTimer *GetTimer(const cTimer *Timer); + cTimer *GetTimer(const cTimer *Timer) { return const_cast(static_cast(this)->GetTimer(Timer)); }; const cTimer *GetMatch(time_t t) const; cTimer *GetMatch(time_t t) { return const_cast(static_cast(this)->GetMatch(t)); }; const cTimer *GetMatch(const cEvent *Event, eTimerMatch *Match = NULL) const;