mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
move unique sort to eventlist.cpp
Origin commit data
------------------
Commit: 63cf116495
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-05-11 (Fri, 11 May 2012)
This commit is contained in:
@@ -87,6 +87,11 @@ inline static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent&
|
|||||||
return a.startTime < b.startTime;
|
return a.startTime < b.startTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static bool sortbyEventid (const CChannelEvent& a, const CChannelEvent& b)
|
||||||
|
{
|
||||||
|
return (a.channelID == b.channelID && a.eventID == b.eventID);
|
||||||
|
}
|
||||||
|
|
||||||
CNeutrinoEventList::CNeutrinoEventList()
|
CNeutrinoEventList::CNeutrinoEventList()
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
@@ -1043,7 +1048,12 @@ bool CNeutrinoEventList::findEvents(void)
|
|||||||
}
|
}
|
||||||
box.hide();
|
box.hide();
|
||||||
}
|
}
|
||||||
|
if(!evtlist.empty()){
|
||||||
sort(evtlist.begin(),evtlist.end(),sortByDateTime);
|
sort(evtlist.begin(),evtlist.end(),sortByDateTime);
|
||||||
|
unique(evtlist.begin(), evtlist.end(),sortbyEventid);
|
||||||
|
evtlist.erase(unique(evtlist.begin(), evtlist.end(),sortbyEventid), evtlist.end());
|
||||||
|
}
|
||||||
|
|
||||||
current_event = (unsigned int)-1;
|
current_event = (unsigned int)-1;
|
||||||
time_t azeit=time(NULL);
|
time_t azeit=time(NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user