diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | filter.c | 11 | ||||
-rw-r--r-- | filter.h | 3 | ||||
-rw-r--r-- | tools.h | 4 |
4 files changed, 17 insertions, 3 deletions
@@ -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. @@ -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; @@ -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,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(); |