diff options
author | kamel5 <kamel5 (at) gmx (dot) net> | 2018-03-08 13:30:41 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-01-27 11:30:01 +0100 |
commit | bf2937d86c316edb716c6fe1bdb97e7c706f675c (patch) | |
tree | fa8878241e876ee18fe417de51fc26cea1f76f6a /searchtimer.c | |
parent | 6ae27238afa33e17dece7311c4728b5c1f2f83b2 (diff) | |
download | vdr-plugin-tvguide-bf2937d86c316edb716c6fe1bdb97e7c706f675c.tar.gz vdr-plugin-tvguide-bf2937d86c316edb716c6fe1bdb97e7c706f675c.tar.bz2 |
Cosmetic changes / SwitchTimer& operator / std:min,std:max
Diffstat (limited to 'searchtimer.c')
-rw-r--r-- | searchtimer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/searchtimer.c b/searchtimer.c index 1af3f86..51a94c5 100644 --- a/searchtimer.c +++ b/searchtimer.c @@ -16,7 +16,7 @@ cTVGuideSearchTimer::cTVGuideSearchTimer(void) { startTime = 0000;
stopTime = 2359;
useChannel = false;
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
channelMin = Channels->GetByNumber(cDevice::CurrentChannel());
channelMax = Channels->GetByNumber(cDevice::CurrentChannel());
@@ -245,7 +245,7 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) { char *channelMinbuffer = NULL;
char *channelMaxbuffer = NULL;
int channels = sscanf(values[value].c_str(), "%a[^|]|%a[^|]", &channelMinbuffer, &channelMaxbuffer);
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
channelMin = Channels->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
#else
@@ -258,7 +258,7 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) { if (channels == 1)
channelMax = channelMin;
else {
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+#if VDRVERSNUM >= 20301
channelMax = Channels->GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
#else
channelMax = Channels.GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
@@ -526,7 +526,7 @@ int cTVGuideSearchTimer::GetNumTimers(void) { int numTimers = 0;
if (ID < 0)
return numTimers;
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
for (const cTimer *timer = Timers->First(); timer; timer = Timers->Next(timer)) {
#else
@@ -545,7 +545,7 @@ int cTVGuideSearchTimer::GetNumRecordings(void) { int numRecordings = 0;
if (ID < 0)
return numRecordings;
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+#if VDRVERSNUM >= 20301
LOCK_RECORDINGS_READ;
for (const cRecording *recording = Recordings->First(); recording; recording = Recordings->Next(recording)) {
#else
@@ -595,7 +595,7 @@ void cTVGuideSearchTimer::Dump(void) { void cTVGuideSearchTimer::SetStartChannel(int startChannel)
{
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
channelMin = Channels->GetByNumber(startChannel);
#else
@@ -605,7 +605,7 @@ void cTVGuideSearchTimer::SetStartChannel(int startChannel) void cTVGuideSearchTimer::SetStopChannel(int stopChannel)
{
-#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
channelMax = Channels->GetByNumber(stopChannel);
#else
|