summaryrefslogtreecommitdiff
path: root/uservars.h
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-12 15:18:58 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-12 15:18:58 +0200
commit1b9fb08a555d89a3b9ec9739f2b17563afb43572 (patch)
treed01be17d0bd17336f74c92fdef94212ed33a6121 /uservars.h
parent8ede45905dde9f4109f3d4f0d2e8cedc7beee01c (diff)
downloadvdr-plugin-epgsearch-1b9fb08a555d89a3b9ec9739f2b17563afb43572.tar.gz
vdr-plugin-epgsearch-1b9fb08a555d89a3b9ec9739f2b17563afb43572.tar.bz2
0002-removed-variableduplications.diff (thx TomJoad@vdr-portal.de)
Diffstat (limited to 'uservars.h')
-rw-r--r--uservars.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/uservars.h b/uservars.h
index f19ea06..546a816 100644
--- a/uservars.h
+++ b/uservars.h
@@ -177,8 +177,7 @@ public:
{
if (!e) return "";
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(e->ChannelID(), true);
+ const cChannel *channel = Channels->GetByChannelID(e->ChannelID(), true);
if (!channel) return "";
string res(channel->GetChannelID().ToString());
@@ -418,8 +417,7 @@ public:
{
if (!e) return "";
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(e->ChannelID(), true);
+ const cChannel *channel = Channels->GetByChannelID(e->ChannelID(), true);
string res = channel?channel->ShortName(true):"";
if (escapeStrings) return "'" + EscapeString(res) + "'"; else return res;
}
@@ -432,8 +430,7 @@ public:
{
if (!e) return "";
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(e->ChannelID(), true);
+ const cChannel *channel = Channels->GetByChannelID(e->ChannelID(), true);
string res = channel?channel->Name():"";
if (escapeStrings) return "'" + EscapeString(res) + "'"; else return res;
}
@@ -446,8 +443,7 @@ class cChannelDataVar : public cInternalVar {
{
if (!e) return "";
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(e->ChannelID(), true);
+ const cChannel *channel = Channels->GetByChannelID(e->ChannelID(), true);
return channel?CHANNELSTRING(channel):"";
}
};
@@ -460,10 +456,9 @@ public:
if (!e) return "";
ostringstream os;
LOCK_CHANNELS_READ;
- const cChannels *vdrchannels = Channels;
- const cChannel *channel = vdrchannels->GetByChannelID(e->ChannelID(), true);
+ const cChannel *channel = Channels->GetByChannelID(e->ChannelID(), true);
while(channel && !channel->GroupSep())
- channel = vdrchannels->Prev(channel);
+ channel = Channels->Prev(channel);
if (!channel || !channel->Name()) return "";
string grpName = channel->Name();
if (escapeStrings) return "'" + EscapeString(grpName) + "'"; else return grpName;