mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
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:
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user