1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Made tChannelID::operator==() inline for better performance

This commit is contained in:
Klaus Schmidinger 2005-05-26 11:25:36 +02:00
parent 70ac6784ac
commit 373c69043a
4 changed files with 8 additions and 8 deletions

View File

@ -1357,3 +1357,6 @@ Johannes Stezenbach <js@linuxtv.org>
Paavo Hartikainen <pahartik@sci.fi> Paavo Hartikainen <pahartik@sci.fi>
for verifying that the byte swap for big endian systems in cDvbOsd::Flush() was for verifying that the byte swap for big endian systems in cDvbOsd::Flush() was
wrong wrong
Georg Acher <acher@baycom.de>
for making tChannelID::operator==() inline for better performance

View File

@ -3563,3 +3563,5 @@ Video Disk Recorder Revision History
is pressed (thanks to Rolf Ahrenberg). is pressed (thanks to Rolf Ahrenberg).
- Moved the NPTL and UTF-8 checks after the version and help output (thanks to - Moved the NPTL and UTF-8 checks after the version and help output (thanks to
Andreas Kool for pointing out that 'vdr --version' failed on an UTF-8 system). Andreas Kool for pointing out that 'vdr --version' failed on an UTF-8 system).
- Made tChannelID::operator==() inline for better performance (thanks to Georg
Acher).

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: channels.c 1.38 2005/05/07 13:14:32 kls Exp $ * $Id: channels.c 1.39 2005/05/26 11:10:06 kls Exp $
*/ */
#include "channels.h" #include "channels.h"
@ -124,11 +124,6 @@ int MapToDriver(int Value, const tChannelParameterMap *Map)
const tChannelID tChannelID::InvalidID; const tChannelID tChannelID::InvalidID;
bool tChannelID::operator== (const tChannelID &arg) const
{
return source == arg.source && nid == arg.nid && tid == arg.tid && sid == arg.sid && rid == arg.rid;
}
tChannelID tChannelID::FromString(const char *s) tChannelID tChannelID::FromString(const char *s)
{ {
char *sourcebuf = NULL; char *sourcebuf = NULL;

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: channels.h 1.29 2005/05/14 09:31:45 kls Exp $ * $Id: channels.h 1.30 2005/05/26 11:11:31 kls Exp $
*/ */
#ifndef __CHANNELS_H #ifndef __CHANNELS_H
@ -65,7 +65,7 @@ private:
public: public:
tChannelID(void) { source = nid = tid = sid = rid = 0; } tChannelID(void) { source = nid = tid = sid = rid = 0; }
tChannelID(int Source, int Nid, int Tid, int Sid, int Rid = 0) { source = Source; nid = Nid; tid = Tid; sid = Sid; rid = Rid; } tChannelID(int Source, int Nid, int Tid, int Sid, int Rid = 0) { source = Source; nid = Nid; tid = Tid; sid = Sid; rid = Rid; }
bool operator== (const tChannelID &arg) const; bool operator== (const tChannelID &arg) const { return source == arg.source && nid == arg.nid && tid == arg.tid && sid == arg.sid && rid == arg.rid; }
bool Valid(void) { return (nid || tid) && sid; } // rid is optional and source may be 0//XXX source may not be 0??? bool Valid(void) { return (nid || tid) && sid; } // rid is optional and source may be 0//XXX source may not be 0???
tChannelID &ClrRid(void) { rid = 0; return *this; } tChannelID &ClrRid(void) { rid = 0; return *this; }
tChannelID &ClrPolarization(void); tChannelID &ClrPolarization(void);