diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-04-06 18:48:25 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-04-07 12:57:22 +0200 |
commit | c7f0131d520eb3bea8737c432e39541e73dcea56 (patch) | |
tree | 21a175cba3d26f101fc30ae918c5065e8d1749c4 /recmenuitem.c | |
parent | 52d887d854c85d1b2b4cb1626020bb85b1042ffd (diff) | |
download | vdr-plugin-tvguide-c7f0131d520eb3bea8737c432e39541e73dcea56.tar.gz vdr-plugin-tvguide-c7f0131d520eb3bea8737c432e39541e73dcea56.tar.bz2 |
Some cosmetic changes
Diffstat (limited to 'recmenuitem.c')
-rw-r--r-- | recmenuitem.c | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/recmenuitem.c b/recmenuitem.c index 08c3417..927618d 100644 --- a/recmenuitem.c +++ b/recmenuitem.c @@ -2004,29 +2004,21 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) { fresh = true; if (!channel) return rmsConsumed; -#if VDRVERSNUM >= 20301 const cChannel *prev = channel; +#if VDRVERSNUM >= 20301 LOCK_CHANNELS_READ; - const cChannel *firstChannel = Channels->First(); + const cChannels* channels = Channels; #else - const cChannel *prev = channel; - const cChannel *firstChannel = Channels.First(); + const cChannels* channels = &Channels; #endif + const cChannel *firstChannel = channels->First(); if(firstChannel->GroupSep()) -#if VDRVERSNUM >= 20301 - firstChannel = Channels->Next(firstChannel); -#else - firstChannel = Channels.Next(firstChannel); -#endif + firstChannel = channels->Next(firstChannel); if (prev == firstChannel) { if (!initialChannelSet) channel = NULL; } else { -#if VDRVERSNUM >= 20301 - while (prev = Channels->Prev(prev)) { -#else - while (prev = Channels.Prev(prev)) { -#endif + while (prev = channels->Prev(prev)) { if(!prev->GroupSep()) { channel = prev; break; @@ -2043,30 +2035,20 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) { return rmsConsumed; break; } case kRight: { -#if VDRVERSNUM >= 20301 - LOCK_CHANNELS_READ; -#endif fresh = true; - if (!channel) { #if VDRVERSNUM >= 20301 - channel = Channels->First(); + LOCK_CHANNELS_READ; + const cChannels* channels = Channels; #else - channel = Channels.First(); + const cChannels* channels = &Channels; #endif + if (!channel) { + channel = channels->First(); if(channel->GroupSep()) -#if VDRVERSNUM >= 20301 - channel = Channels->Next(channel); -#else - channel = Channels.Next(channel); -#endif + channel = channels->Next(channel); } else { -#if VDRVERSNUM >= 20301 const cChannel *next = channel; - while (next = Channels->Next(next)) { -#else - const cChannel *next = channel; - while (next = Channels.Next(next)) { -#endif + while (next = channels->Next(next)) { if(!next->GroupSep()) { channel = next; break; |