Some cosmetic changes

This commit is contained in:
kamel5 2019-04-06 18:48:25 +02:00
parent 52d887d854
commit c7f0131d52

View File

@ -2004,29 +2004,21 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
fresh = true; fresh = true;
if (!channel) if (!channel)
return rmsConsumed; return rmsConsumed;
#if VDRVERSNUM >= 20301
const cChannel *prev = channel; const cChannel *prev = channel;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannel *firstChannel = Channels->First(); const cChannels* channels = Channels;
#else #else
const cChannel *prev = channel; const cChannels* channels = &Channels;
const cChannel *firstChannel = Channels.First();
#endif #endif
const cChannel *firstChannel = channels->First();
if(firstChannel->GroupSep()) if(firstChannel->GroupSep())
#if VDRVERSNUM >= 20301 firstChannel = channels->Next(firstChannel);
firstChannel = Channels->Next(firstChannel);
#else
firstChannel = Channels.Next(firstChannel);
#endif
if (prev == firstChannel) { if (prev == firstChannel) {
if (!initialChannelSet) if (!initialChannelSet)
channel = NULL; channel = NULL;
} else { } else {
#if VDRVERSNUM >= 20301 while (prev = channels->Prev(prev)) {
while (prev = Channels->Prev(prev)) {
#else
while (prev = Channels.Prev(prev)) {
#endif
if(!prev->GroupSep()) { if(!prev->GroupSep()) {
channel = prev; channel = prev;
break; break;
@ -2043,30 +2035,20 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
return rmsConsumed; return rmsConsumed;
break; } break; }
case kRight: { case kRight: {
fresh = true;
#if VDRVERSNUM >= 20301 #if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ; LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
#else
const cChannels* channels = &Channels;
#endif #endif
fresh = true;
if (!channel) { if (!channel) {
#if VDRVERSNUM >= 20301 channel = channels->First();
channel = Channels->First();
#else
channel = Channels.First();
#endif
if(channel->GroupSep()) if(channel->GroupSep())
#if VDRVERSNUM >= 20301 channel = channels->Next(channel);
channel = Channels->Next(channel);
#else
channel = Channels.Next(channel);
#endif
} else { } else {
#if VDRVERSNUM >= 20301
const cChannel *next = channel; const cChannel *next = channel;
while (next = Channels->Next(next)) { while (next = channels->Next(next)) {
#else
const cChannel *next = channel;
while (next = Channels.Next(next)) {
#endif
if(!next->GroupSep()) { if(!next->GroupSep()) {
channel = next; channel = next;
break; break;