mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Some cosmetic changes
This commit is contained in:
parent
a8ca6f19da
commit
f7e5ac3208
@ -22,18 +22,6 @@ cSwitchTimer::cSwitchTimer(const cEvent* Event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VDRVERSNUM >= 20305
|
|
||||||
cSwitchTimer& cSwitchTimer::operator= (const cSwitchTimer &SwitchTimer)
|
|
||||||
{
|
|
||||||
this->eventID = SwitchTimer.eventID;
|
|
||||||
this->startTime = SwitchTimer.startTime;
|
|
||||||
this->channelID = SwitchTimer.channelID;
|
|
||||||
this->switchMinsBefore = SwitchTimer.switchMinsBefore;
|
|
||||||
this->announceOnly = SwitchTimer.announceOnly;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
bool cSwitchTimer::Parse(const char *s) {
|
bool cSwitchTimer::Parse(const char *s) {
|
||||||
char *line;
|
char *line;
|
||||||
char *pos;
|
char *pos;
|
||||||
|
@ -12,7 +12,15 @@ public:
|
|||||||
int announceOnly;
|
int announceOnly;
|
||||||
#if VDRVERSNUM >= 20305
|
#if VDRVERSNUM >= 20305
|
||||||
cSwitchTimer(const cSwitchTimer &SwitchTimer) { *this = SwitchTimer; };
|
cSwitchTimer(const cSwitchTimer &SwitchTimer) { *this = SwitchTimer; };
|
||||||
cSwitchTimer& operator= (const cSwitchTimer &SwitchTimer);
|
cSwitchTimer& operator= (const cSwitchTimer &SwitchTimer)
|
||||||
|
{
|
||||||
|
this->eventID = SwitchTimer.eventID;
|
||||||
|
this->startTime = SwitchTimer.startTime;
|
||||||
|
this->channelID = SwitchTimer.channelID;
|
||||||
|
this->switchMinsBefore = SwitchTimer.switchMinsBefore;
|
||||||
|
this->announceOnly = SwitchTimer.announceOnly;
|
||||||
|
return *this;
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
cSwitchTimer(void);
|
cSwitchTimer(void);
|
||||||
cSwitchTimer(const cEvent* Event);
|
cSwitchTimer(const cEvent* Event);
|
||||||
|
@ -71,7 +71,7 @@ void cTVGuideTimerConflicts::AddConflict(std::string epgSearchConflictLine) {
|
|||||||
splitstring s3(flds2[2].c_str());
|
splitstring s3(flds2[2].c_str());
|
||||||
std::vector<std::string> flds3 = s3.split('#');
|
std::vector<std::string> flds3 = s3.split('#');
|
||||||
std::vector<int> timerIDs;
|
std::vector<int> timerIDs;
|
||||||
for (int k = 0; k < flds3.size(); k++) {
|
for (int k = 0; k < (int)flds3.size(); k++) {
|
||||||
timerIDs.push_back(atoi(flds3[k].c_str()) - 1);
|
timerIDs.push_back(atoi(flds3[k].c_str()) - 1);
|
||||||
}
|
}
|
||||||
conflict->timerIDs = timerIDs;
|
conflict->timerIDs = timerIDs;
|
||||||
@ -80,18 +80,17 @@ void cTVGuideTimerConflicts::AddConflict(std::string epgSearchConflictLine) {
|
|||||||
|
|
||||||
void cTVGuideTimerConflicts::CalculateConflicts(void) {
|
void cTVGuideTimerConflicts::CalculateConflicts(void) {
|
||||||
numConflicts = conflicts.size();
|
numConflicts = conflicts.size();
|
||||||
// time_t startTime = 0;
|
|
||||||
// time_t endTime = 0;
|
|
||||||
for (int i=0; i < numConflicts; i++) {
|
for (int i=0; i < numConflicts; i++) {
|
||||||
cTimeInterval *unionSet = NULL;
|
cTimeInterval *unionSet = NULL;
|
||||||
int numTimers = conflicts[i]->timerIDs.size();
|
int numTimers = conflicts[i]->timerIDs.size();
|
||||||
for (int j=0; j < numTimers; j++) {
|
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
const cTimer *timer = Timers->Get(conflicts[i]->timerIDs[j]);
|
const cTimers* timers = Timers;
|
||||||
#else
|
#else
|
||||||
const cTimer *timer = Timers.Get(conflicts[i]->timerIDs[j]);
|
const cTimers* timers = &Timers;
|
||||||
#endif
|
#endif
|
||||||
|
for (int j=0; j < numTimers; j++) {
|
||||||
|
const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]);
|
||||||
if (timer) {
|
if (timer) {
|
||||||
if (!unionSet) {
|
if (!unionSet) {
|
||||||
unionSet = new cTimeInterval(timer->StartTime(), timer->StopTime());
|
unionSet = new cTimeInterval(timer->StartTime(), timer->StopTime());
|
||||||
@ -110,12 +109,7 @@ void cTVGuideTimerConflicts::CalculateConflicts(void) {
|
|||||||
|
|
||||||
cTimeInterval *intersect = NULL;
|
cTimeInterval *intersect = NULL;
|
||||||
for (int j=0; j < numTimers; j++) {
|
for (int j=0; j < numTimers; j++) {
|
||||||
#if VDRVERSNUM >= 20301
|
const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]);
|
||||||
LOCK_TIMERS_READ;
|
|
||||||
const cTimer *timer = Timers->Get(conflicts[i]->timerIDs[j]);
|
|
||||||
#else
|
|
||||||
const cTimer *timer = Timers.Get(conflicts[i]->timerIDs[j]);
|
|
||||||
#endif
|
|
||||||
if (timer) {
|
if (timer) {
|
||||||
if (!intersect) {
|
if (!intersect) {
|
||||||
intersect = new cTimeInterval(timer->StartTime(), timer->StopTime());
|
intersect = new cTimeInterval(timer->StartTime(), timer->StopTime());
|
||||||
|
2
tools.c
2
tools.c
@ -144,7 +144,7 @@ std::vector<std::string>& splitstring::split(char delim, int rep) {
|
|||||||
std::string work = data();
|
std::string work = data();
|
||||||
std::string buf = "";
|
std::string buf = "";
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (i < work.length()) {
|
while (i < (int)work.length()) {
|
||||||
if (work[i] != delim)
|
if (work[i] != delim)
|
||||||
buf += work[i];
|
buf += work[i];
|
||||||
else if (rep == 1) {
|
else if (rep == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user