eventlist.cpp: add startTime comparison to unique sort

This commit is contained in:
satbaby
2012-05-14 11:33:20 +02:00
parent 7f1874b08e
commit fdb3e8fcc0

View File

@@ -89,7 +89,7 @@ inline static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent&
inline static bool sortbyEventid (const CChannelEvent& a, const CChannelEvent& b)
{
return (a.channelID == b.channelID && a.eventID == b.eventID);
return (a.channelID == b.channelID && a.eventID == b.eventID && a.startTime == b.startTime);
}
CNeutrinoEventList::CNeutrinoEventList()
@@ -1050,7 +1050,6 @@ bool CNeutrinoEventList::findEvents(void)
}
if(!evtlist.empty()){
sort(evtlist.begin(),evtlist.end(),sortByDateTime);
unique(evtlist.begin(), evtlist.end(),sortbyEventid);
evtlist.erase(unique(evtlist.begin(), evtlist.end(),sortbyEventid), evtlist.end());
}