summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Friedrichs <johann.friedrichs@web.de>2018-03-21 11:03:25 (GMT)
committerJohann Friedrichs <johann.friedrichs@web.de>2018-03-21 11:03:25 (GMT)
commit9c7d95ff8d6ba965cb23147507a859b1fd0491d6 (patch)
tree04b4e93081b4f357a998548041362200efedb0ba
parentc7c02e2031801015dc70d6d4652e71ab9c2a2ea6 (diff)
downloadvdr-plugin-epgsearch-9c7d95ff8d6ba965cb23147507a859b1fd0491d6.tar.gz
vdr-plugin-epgsearch-9c7d95ff8d6ba965cb23147507a859b1fd0491d6.tar.bz2
get rid of some casts
-rw-r--r--blacklist.c10
-rw-r--r--epgsearchext.c12
-rw-r--r--menu_main.c16
3 files changed, 18 insertions, 20 deletions
diff --git a/blacklist.c b/blacklist.c
index 4ea3583..e32f046 100644
--- a/blacklist.c
+++ b/blacklist.c
@@ -644,7 +644,7 @@ cSearchResults* cBlacklist::Run(cSearchResults* pSearchResults, int MarginStop)
const cChannel* channel = Channels->GetByChannelID(Schedule->ChannelID(),true,true);
if (!channel)
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
@@ -652,7 +652,7 @@ cSearchResults* cBlacklist::Run(cSearchResults* pSearchResults, int MarginStop)
{
if (channelMin->Number() > channel->Number() || channelMax->Number() < channel->Number())
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
}
@@ -661,7 +661,7 @@ cSearchResults* cBlacklist::Run(cSearchResults* pSearchResults, int MarginStop)
cChannelGroup* group = ChannelGroups.GetGroupByName(channelGroup);
if (!group || !group->ChannelInGroup(channel))
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
}
@@ -670,7 +670,7 @@ cSearchResults* cBlacklist::Run(cSearchResults* pSearchResults, int MarginStop)
{
if (channel->Ca() >= CA_ENCRYPTED_MIN)
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
}
@@ -685,7 +685,7 @@ cSearchResults* cBlacklist::Run(cSearchResults* pSearchResults, int MarginStop)
pSearchResults->Add(new cSearchResult(event, this));
}
} while(pPrevEvent);
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
}
LogFile.Log(3,"found %d event(s) for blacklist '%s'", pSearchResults?pSearchResults->Count():0, search);
diff --git a/epgsearchext.c b/epgsearchext.c
index bfe8b5c..f8d1f90 100644
--- a/epgsearchext.c
+++ b/epgsearchext.c
@@ -1035,7 +1035,7 @@ cSearchResults* cSearchExt::Run(int PayTVMode, bool inspectTimerMargin, int eval
const cChannel* channel = Channels->GetByChannelID(Schedule->ChannelID(),true,true);
if (!channel)
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
@@ -1043,7 +1043,7 @@ cSearchResults* cSearchExt::Run(int PayTVMode, bool inspectTimerMargin, int eval
{
if (channelMin->Number() > channel->Number() || channelMax->Number() < channel->Number())
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
}
@@ -1052,7 +1052,7 @@ cSearchResults* cSearchExt::Run(int PayTVMode, bool inspectTimerMargin, int eval
cChannelGroup* group = ChannelGroups.GetGroupByName(channelGroup);
if (!group || !group->ChannelInGroup(channel))
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
}
@@ -1061,7 +1061,7 @@ cSearchResults* cSearchExt::Run(int PayTVMode, bool inspectTimerMargin, int eval
{
if (channel->Ca() >= CA_ENCRYPTED_MIN)
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
}
@@ -1070,7 +1070,7 @@ cSearchResults* cSearchExt::Run(int PayTVMode, bool inspectTimerMargin, int eval
{
if (channel->Ca() >= CA_ENCRYPTED_MIN)
{
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
continue;
}
}
@@ -1096,7 +1096,7 @@ cSearchResults* cSearchExt::Run(int PayTVMode, bool inspectTimerMargin, int eval
counter++;
}
} while(pPrevEvent);
- Schedule = (const cSchedule *)Schedules->Next(Schedule);
+ Schedule = Schedules->Next(Schedule);
}
LogFile.Log(3,"found %d event(s) for search timer '%s'", counter, search);
} // Give up locks
diff --git a/menu_main.c b/menu_main.c
index d392e20..f0b81b6 100644
--- a/menu_main.c
+++ b/menu_main.c
@@ -182,13 +182,12 @@ eOSState cMenuSearchMain::Record(void)
{
cMenuMyScheduleItem *item = (cMenuMyScheduleItem *)Get(Current());
if (item) {
- cTimer *timer, *t;
- {
- LOCK_TIMERS_READ;
+ LOCK_TIMERS_WRITE;
+ Timers->SetExplicitModify();
if (item->timerMatch == tmFull)
{
eTimerMatch tm = tmNone;
- cTimer *timer = (cTimer*)Timers->GetMatch(item->event, &tm);
+ cTimer *timer = Timers->GetMatch(item->event, &tm);
if (timer)
{
if (EPGSearchConfig.useVDRTimerEditMenu)
@@ -198,11 +197,10 @@ eOSState cMenuSearchMain::Record(void)
}
}
- timer = new cTimer(item->event);
+ cTimer *timer = new cTimer(item->event);
PrepareTimerFile(item->event, timer);
- t = (cTimer*)Timers->GetTimer(timer);
- } // release TIMERS_READ
+ cTimer *t = Timers->GetTimer(timer);
if (EPGSearchConfig.onePressTimerCreation == 0 || t || !item->event || (!t && item->event && item->event->StartTime() - (Setup.MarginStart+2) * 60 < time(NULL)))
{
if (t)
@@ -241,8 +239,8 @@ eOSState cMenuSearchMain::Record(void)
SetAux(timer, fullaux);
if (Setup.SVDRPPeering && *Setup.SVDRPDefaultHost)
timer->SetRemote(Setup.SVDRPDefaultHost);
- LOCK_TIMERS_WRITE;
- Timers->Add(timer); // implicit SetModified
+ Timers->Add(timer);
+ Timers->SetModified();
gl_timerStatusMonitor->SetConflictCheckAdvised();
timer->Matches();
if (!HandleRemoteTimerModifications(timer)) {