eventlist.cpp: add startTime comparison to unique sort

Origin commit data
------------------
Commit: fdb3e8fcc0
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-05-14 (Mon, 14 May 2012)
This commit is contained in:
Jacek Jendrzej
2012-05-14 11:33:20 +02:00
parent a9d5e510a9
commit dceef302ae

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) 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() CNeutrinoEventList::CNeutrinoEventList()
@@ -1050,7 +1050,6 @@ bool CNeutrinoEventList::findEvents(void)
} }
if(!evtlist.empty()){ 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()); evtlist.erase(unique(evtlist.begin(), evtlist.end(),sortbyEventid), evtlist.end());
} }