Added a missing 'const' to cTimers::GetTimerForEvent()

This commit is contained in:
Klaus Schmidinger 2022-11-20 10:57:31 +01:00
parent 83c9677899
commit a4cde807bc
4 changed files with 7 additions and 5 deletions

View File

@ -2537,6 +2537,7 @@ Markus Ehrnsperger <markus.ehrnsperger@googlemail.com>
Make.config
for reporting a bug in error handling when loading a plugin
for reporting a possible crash in cIndexFile::GetClosestIFrame()
for reporting a missing 'const' in cTimers::GetTimerForEvent()
Werner Färber <w.faerber@gmx.de>
for reporting a bug in handling the cPluginManager::Active() result when pressing

View File

@ -9780,7 +9780,7 @@ Video Disk Recorder Revision History
out by Onur Sentürk).
- Official release.
2022-11-19:
2022-11-20:
- Added UPDATE-2.6.0, which was missing in the official 2.6.0 release.
- Fixed unexpected calls of the '-r' script when a recording is interrupted and
@ -9799,3 +9799,4 @@ Video Disk Recorder Revision History
- Removed some unnecessary locks from SVDRPClientHandler.
- Fixed a possible deadlock in case two SVDRP clients send each other POLL commands
at the same time.
- Added a missing 'const' to cTimers::GetTimerForEvent() (reported by Markus Ehrnsperger).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: timers.c 5.17 2021/05/03 14:06:12 kls Exp $
* $Id: timers.c 5.18 2022/11/20 10:57:31 kls Exp $
*/
#include "timers.h"
@ -1131,7 +1131,7 @@ const cTimer *cTimers::GetMatch(const cEvent *Event, eTimerMatch *Match) const
return t;
}
const cTimer *cTimers::GetTimerForEvent(const cEvent *Event, eTimerFlags Flags)
const cTimer *cTimers::GetTimerForEvent(const cEvent *Event, eTimerFlags Flags) const
{
if (Event && Event->HasTimer()) {
for (const cTimer *ti = First(); ti; ti = Next(ti)) {

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: timers.h 5.8 2021/04/20 13:22:37 kls Exp $
* $Id: timers.h 5.9 2022/11/20 10:57:31 kls Exp $
*/
#ifndef __TIMERS_H
@ -194,7 +194,7 @@ public:
cTimer *GetMatch(time_t t) { return const_cast<cTimer *>(static_cast<const cTimers *>(this)->GetMatch(t)); };
const cTimer *GetMatch(const cEvent *Event, eTimerMatch *Match = NULL) const;
cTimer *GetMatch(const cEvent *Event, eTimerMatch *Match = NULL) { return const_cast<cTimer *>(static_cast<const cTimers *>(this)->GetMatch(Event, Match)); }
const cTimer *GetTimerForEvent(const cEvent *Event, eTimerFlags Flags = tfNone);
const cTimer *GetTimerForEvent(const cEvent *Event, eTimerFlags Flags = tfNone) const;
int GetMaxPriority(void) const;
///< Returns the maximum priority of all local timers that are currently recording.
///< If there is no local timer currently recording, -1 is returned.