Cosmetic changes in channelgroups.c

This commit is contained in:
kamel5 2019-07-11 13:40:00 +02:00
parent 700543b394
commit 45a2d6bee0

View File

@ -13,19 +13,16 @@ void cChannelGroups::ReadChannelGroups(void) {
int lastChannelNumber = 0; int lastChannelNumber = 0;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannel *first = Channels->First(); const cChannels *channels = Channels;
#else #else
const cChannel *first = Channels.First(); const cChannels *channels = &Channels;
#endif #endif
const cChannel *first = channels->First();
if (!first->GroupSep()) { if (!first->GroupSep()) {
channelGroups.push_back(cChannelGroup(tr("Main Program"))); channelGroups.push_back(cChannelGroup(tr("Main Program")));
setStart = true; setStart = true;
} }
#if VDRVERSNUM >= 20301 for (const cChannel *channel = channels->First(); channel; channel = channels->Next(channel)) {
for (const cChannel *channel = Channels->First(); channel; channel = Channels->Next(channel)) {
#else
for (const cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
#endif
if (setStart && (channelGroups.size() > 0)) { if (setStart && (channelGroups.size() > 0)) {
channelGroups[channelGroups.size() - 1].SetChannelStart(channel->Number()); channelGroups[channelGroups.size() - 1].SetChannelStart(channel->Number());
setStart = false; setStart = false;