summaryrefslogtreecommitdiff
path: root/channelgroups.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 13:40:00 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-11 13:40:00 +0200
commit45a2d6bee0d1146e525777bb0dd06904448030ed (patch)
tree077782960a158e3b721430fcc3ec19c6edabd4d0 /channelgroups.c
parent700543b394c4e87e3bc372fb00c221c456c2adf2 (diff)
downloadvdr-plugin-tvguide-45a2d6bee0d1146e525777bb0dd06904448030ed.tar.gz
vdr-plugin-tvguide-45a2d6bee0d1146e525777bb0dd06904448030ed.tar.bz2
Cosmetic changes in channelgroups.c
Diffstat (limited to 'channelgroups.c')
-rw-r--r--channelgroups.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/channelgroups.c b/channelgroups.c
index bd9f8f5..0ca3c72 100644
--- a/channelgroups.c
+++ b/channelgroups.c
@@ -13,26 +13,23 @@ void cChannelGroups::ReadChannelGroups(void) {
int lastChannelNumber = 0;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
- const cChannel *first = Channels->First();
+ const cChannels *channels = Channels;
#else
- const cChannel *first = Channels.First();
+ const cChannels *channels = &Channels;
#endif
+ const cChannel *first = channels->First();
if (!first->GroupSep()) {
channelGroups.push_back(cChannelGroup(tr("Main Program")));
setStart = true;
}
-#if VDRVERSNUM >= 20301
- for (const cChannel *channel = Channels->First(); channel; channel = Channels->Next(channel)) {
-#else
- for (const cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
-#endif
+ for (const cChannel *channel = channels->First(); channel; channel = channels->Next(channel)) {
if (setStart && (channelGroups.size() > 0)) {
- channelGroups[channelGroups.size()-1].SetChannelStart(channel->Number());
+ channelGroups[channelGroups.size() - 1].SetChannelStart(channel->Number());
setStart = false;
}
if (channel->GroupSep()) {
if (channelGroups.size() > 0) {
- channelGroups[channelGroups.size()-1].SetChannelStop(lastChannelNumber);
+ channelGroups[channelGroups.size() - 1].SetChannelStop(lastChannelNumber);
}
channelGroups.push_back(cChannelGroup(channel->Name()));
setStart = true;
@@ -41,8 +38,8 @@ void cChannelGroups::ReadChannelGroups(void) {
}
}
if (channelGroups.size() > 0) {
- channelGroups[channelGroups.size()-1].SetChannelStop(lastChannelNumber);
- if ((config.hideLastGroup)&&(channelGroups.size() > 1)) {
+ channelGroups[channelGroups.size() - 1].SetChannelStop(lastChannelNumber);
+ if ((config.hideLastGroup) && (channelGroups.size() > 1)) {
channelGroups.pop_back();
}
}