mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
cListObject now implements a private copy constructor and assignment operator, to keep derived objects from calling them implicitly
This commit is contained in:
parent
7d1dde01ba
commit
8e9d445248
2
HISTORY
2
HISTORY
@ -9007,3 +9007,5 @@ Video Disk Recorder Revision History
|
||||
- Fixed a memory leak in cSectionSyncerHash. The cSectionSyncerEntry objects put into
|
||||
the hash were never explicitly deleted. Now the cSectionSyncerHash takes ownership of
|
||||
these objects.
|
||||
- cListObject now implements a private copy constructor and assignment operator, to keep
|
||||
derived objects from calling them implicitly.
|
||||
|
11
filter.c
11
filter.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: filter.c 4.2 2015/07/25 10:59:57 kls Exp $
|
||||
* $Id: filter.c 4.3 2017/05/09 08:37:23 kls Exp $
|
||||
*/
|
||||
|
||||
#include "filter.h"
|
||||
@ -71,6 +71,15 @@ cFilterData::cFilterData(u_short Pid, u_char Tid, u_char Mask, bool Sticky)
|
||||
sticky = Sticky;
|
||||
}
|
||||
|
||||
cFilterData& cFilterData::operator= (const cFilterData &FilterData)
|
||||
{
|
||||
pid = FilterData.pid;
|
||||
tid = FilterData.tid;
|
||||
mask = FilterData.mask;
|
||||
sticky = FilterData.sticky;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool cFilterData::Is(u_short Pid, u_char Tid, u_char Mask)
|
||||
{
|
||||
return pid == Pid && tid == Tid && mask == Mask;
|
||||
|
3
filter.h
3
filter.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: filter.h 4.2 2015/07/25 10:03:44 kls Exp $
|
||||
* $Id: filter.h 4.3 2017/05/09 08:37:23 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __FILTER_H
|
||||
@ -38,6 +38,7 @@ public:
|
||||
bool sticky;
|
||||
cFilterData(void);
|
||||
cFilterData(u_short Pid, u_char Tid, u_char Mask, bool Sticky);
|
||||
cFilterData& operator= (const cFilterData &FilterData);
|
||||
bool Is(u_short Pid, u_char Tid, u_char Mask);
|
||||
bool Matches(u_short Pid, u_char Tid);
|
||||
};
|
||||
|
4
tools.h
4
tools.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.h 4.7 2017/05/09 08:33:37 kls Exp $
|
||||
* $Id: tools.h 4.8 2017/05/09 08:37:23 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_H
|
||||
@ -479,6 +479,8 @@ class cListObject {
|
||||
friend class cListGarbageCollector;
|
||||
private:
|
||||
cListObject *prev, *next;
|
||||
cListObject(const cListObject &ListObject) { abort(); } // no copy constructor!
|
||||
cListObject& operator= (const cListObject &ListObject) { abort(); return *this; } // no assignment operator!
|
||||
public:
|
||||
cListObject(void);
|
||||
virtual ~cListObject();
|
||||
|
Loading…
Reference in New Issue
Block a user