From 1b9fb08a555d89a3b9ec9739f2b17563afb43572 Mon Sep 17 00:00:00 2001 From: Frank Neumann Date: Fri, 12 May 2017 15:18:58 +0200 Subject: 0002-removed-variableduplications.diff (thx TomJoad@vdr-portal.de) --- epgsearchsvdrp.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'epgsearchsvdrp.c') diff --git a/epgsearchsvdrp.c b/epgsearchsvdrp.c index 7398b9c..2f5720e 100644 --- a/epgsearchsvdrp.c +++ b/epgsearchsvdrp.c @@ -563,16 +563,14 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option, eTimerMatch timerMatch; bool hasTimer = false; LOCK_TIMERS_READ; - const cTimers *vdrtimers = Timers; - if (vdrtimers->GetMatch(pEvent, &timerMatch)) + if (Timers->GetMatch(pEvent, &timerMatch)) hasTimer = (timerMatch == tmFull); if (!result->search->useAsSearchTimer) result->needsTimer = false; LOCK_CHANNELS_READ; - const cChannels *vdrchannels = Channels; - const cChannel *channel = vdrchannels->GetByChannelID(pEvent->ChannelID(), true,true); + const cChannel *channel = Channels->GetByChannelID(pEvent->ChannelID(), true,true); int timerMode = hasTimer?1:(result->needsTimer?2:0); string title = pEvent->Title()?ReplaceAll(pEvent->Title(), "|", "!^pipe!^"):""; @@ -1048,8 +1046,7 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option, return cString::sprintf("invalid channel id"); } LOCK_CHANNELS_READ; - const cChannels *vdrchannels = Channels; - const cChannel *ch = vdrchannels->GetByChannelID(chID,true,true); + const cChannel *ch = Channels->GetByChannelID(chID,true,true); if (!ch) { ReplyCode = 901; @@ -1060,13 +1057,12 @@ cString cPluginEpgsearch::SVDRPCommand(const char *Command, const char *Option, else { LOCK_CHANNELS_READ; - const cChannels *vdrchannels = Channels; string sBuffer; - for (int i = 0; i < vdrchannels->Count(); i++) + for (int i = 0; i < Channels->Count(); i++) { - const cChannel* ch = vdrchannels->Get(i); + const cChannel* ch = Channels->Get(i); if (ch && !ch->GroupSep()) - sBuffer += string(*ch->GetChannelID().ToString()) + string(": ") + NumToString(DefTimerCheckModes.GetMode(ch)) + string((iCount()-1)?"\n":""); + sBuffer += string(*ch->GetChannelID().ToString()) + string(": ") + NumToString(DefTimerCheckModes.GetMode(ch)) + string((iCount()-1)?"\n":""); } return sBuffer.c_str(); } -- cgit v1.2.3