summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasmin Jessich <jasmin@anw.at>2017-05-25 16:42:54 (GMT)
committerFrank Neumann <fnu@yavdr.org>2017-05-25 16:42:54 (GMT)
commita4e8393ac7d7a5a81f38da3b82745d5206fafa96 (patch)
tree575f889b12a6c6d7a879a96695376fe2d470f6fe
parent09fb7f2ee787ae79bdcf39be1a05d561d41f6f79 (diff)
downloadvdr-plugin-epgsearch-a4e8393ac7d7a5a81f38da3b82745d5206fafa96.tar.gz
vdr-plugin-epgsearch-a4e8393ac7d7a5a81f38da3b82745d5206fafa96.tar.bz2
Added operator to cListObject derived classes.
-rw-r--r--epgsearchcfg.c10
-rw-r--r--epgsearchcfg.h1
-rw-r--r--menu_switchtimers.c2
-rw-r--r--switchtimer.c11
-rw-r--r--switchtimer.h1
5 files changed, 24 insertions, 1 deletions
diff --git a/epgsearchcfg.c b/epgsearchcfg.c
index 25fcb42..7124271 100644
--- a/epgsearchcfg.c
+++ b/epgsearchcfg.c
@@ -94,6 +94,16 @@ cEPGSearchConfig::cEPGSearchConfig(void)
sendMailOnConflicts = 0;
}
+cShowMode& cShowMode::operator= (const cShowMode &ShowMode)
+{
+ this->mode = ShowMode.mode;
+ this->seekTime = ShowMode.seekTime;
+ memcpy(this->description, ShowMode.description, sizeof(ShowMode.description));
+ this->useIt = ShowMode.useIt;
+ this->itime = ShowMode.itime;
+ return *this;
+}
+
int cShowMode::Compare(const cListObject &ListObject) const
{
cShowMode *p = (cShowMode *)&ListObject;
diff --git a/epgsearchcfg.h b/epgsearchcfg.h
index 2fafef9..e51dee8 100644
--- a/epgsearchcfg.h
+++ b/epgsearchcfg.h
@@ -60,6 +60,7 @@ class cShowMode: public cListObject
else
sprintf(description, "%02d:%02d", iTime/100, iTime%100);
}
+ cShowMode& operator= (const cShowMode &ShowMode);
const char* GetDescription() { return description; }
int GetTime() const { return itime; }
bool GetUsage() const { return useIt; }
diff --git a/menu_switchtimers.c b/menu_switchtimers.c
index ab14c1f..00ccfba 100644
--- a/menu_switchtimers.c
+++ b/menu_switchtimers.c
@@ -181,7 +181,7 @@ cSwitchTimer* cMenuSwitchTimers::CurrentSwitchTimer(void)
{
cMenuSwitchTimerItem *item = (cMenuSwitchTimerItem *)Get(Current());
if (item && SwitchTimers.Exists(item->switchTimer))
- return item->switchTimer;
+ return item->switchTimer;
return NULL;
}
diff --git a/switchtimer.c b/switchtimer.c
index af0c721..b01172e 100644
--- a/switchtimer.c
+++ b/switchtimer.c
@@ -49,6 +49,17 @@ cSwitchTimer::cSwitchTimer(const cEvent* Event, int SwitchMinsBefore, int Mode,
unmute = Unmute;
}
+cSwitchTimer& cSwitchTimer::operator= (const cSwitchTimer &SwitchTimer)
+{
+ this->eventID = SwitchTimer.eventID;
+ this->startTime = SwitchTimer.startTime;
+ this->channelID = SwitchTimer.channelID;
+ this->switchMinsBefore = SwitchTimer.switchMinsBefore;
+ this->mode = SwitchTimer.mode;
+ this->unmute = SwitchTimer.unmute;
+ return *this;
+}
+
bool cSwitchTimer::Parse(const char *s)
{
char *line;
diff --git a/switchtimer.h b/switchtimer.h
index 6f2345d..695249b 100644
--- a/switchtimer.h
+++ b/switchtimer.h
@@ -39,6 +39,7 @@ public:
cSwitchTimer(void);
cSwitchTimer(const cEvent* Event, int SwitchMinsBefore=1, int mode=0, int unmute=0);
+ cSwitchTimer& operator= (const cSwitchTimer &SwitchTimer);
const cEvent* Event();
bool Parse(const char *s);
cString ToText(bool& ignore);