Deprecated code is now marked with [[deprecated]] to issue a compile time warning when used

This commit is contained in:
Klaus Schmidinger 2024-09-09 22:15:59 +02:00
parent c0a005b3cd
commit f006884e57
4 changed files with 10 additions and 4 deletions

View File

@ -9984,6 +9984,8 @@ Video Disk Recorder Revision History
version numbering. Version numbers are simply counted upwards, with each of the three version numbering. Version numbers are simply counted upwards, with each of the three
parts ("version", "major", "minor") always being a single digit, and '0' being skipped. parts ("version", "major", "minor") always being a single digit, and '0' being skipped.
2024-09-09: 2024-09-10:
- Fix for compilers that don't like non-constant format strings (thanks to Stefan Hofmann). - Fix for compilers that don't like non-constant format strings (thanks to Stefan Hofmann).
- Deprecated code is now marked with [[deprecated]] to issue a compile time warning when
used.

3
epg.h
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* *
* $Id: epg.h 5.4 2024/07/15 14:42:22 kls Exp $ * $Id: epg.h 5.5 2024/09/09 22:15:59 kls Exp $
*/ */
#ifndef __EPG_H #ifndef __EPG_H
@ -191,6 +191,7 @@ public:
#define DEPRECATED_SCHEDULE_GET_EVENT 0 #define DEPRECATED_SCHEDULE_GET_EVENT 0
#endif #endif
#if DEPRECATED_SCHEDULE_GET_EVENT #if DEPRECATED_SCHEDULE_GET_EVENT
[[deprecated("see HISTORY, version 2.5.2")]]
const cEvent *GetEvent(tEventID EventID, time_t StartTime = 0) const; const cEvent *GetEvent(tEventID EventID, time_t StartTime = 0) const;
#endif #endif
const cEvent *GetEventById(tEventID EventID) const; const cEvent *GetEventById(tEventID EventID) const;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: filter.h 5.2 2024/07/15 14:42:22 kls Exp $ * $Id: filter.h 5.3 2024/09/09 22:15:59 kls Exp $
*/ */
#ifndef __FILTER_H #ifndef __FILTER_H
@ -52,7 +52,9 @@ public:
bool Complete(void) { return complete; } bool Complete(void) { return complete; }
///< Returns true if all sections have been processed. ///< Returns true if all sections have been processed.
#if DEPRECATED_SECTIONSYNCER_SYNC_REPEAT #if DEPRECATED_SECTIONSYNCER_SYNC_REPEAT
[[deprecated("see HISTORY, version 2.5.2")]]
void Repeat(void); void Repeat(void);
[[deprecated("see HISTORY, version 2.5.2")]]
bool Sync(uchar Version, int Number, int LastNumber); bool Sync(uchar Version, int Number, int LastNumber);
#endif #endif
}; };

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: player.h 5.2 2024/07/15 14:42:22 kls Exp $ * $Id: player.h 5.3 2024/09/09 22:15:59 kls Exp $
*/ */
#ifndef __PLAYER_H #ifndef __PLAYER_H
@ -119,6 +119,7 @@ public:
#define DEPRECATED_CCONTROL 0 #define DEPRECATED_CCONTROL 0
#endif #endif
#if DEPRECATED_CCONTROL #if DEPRECATED_CCONTROL
[[deprecated("see HISTORY, version 2.4.2")]]
static cControl *Control(bool Hidden = false); static cControl *Control(bool Hidden = false);
///< Old version of this function, for backwards compatibility with plugins. ///< Old version of this function, for backwards compatibility with plugins.
///< Plugins should be changed to use the new version below, which does ///< Plugins should be changed to use the new version below, which does