move unique sort to eventlist.cpp

Origin commit data
------------------
Branch: ni/coolstream
Commit: 8d22e72962
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-05-11 (Fri, 11 May 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-05-11 13:13:50 +02:00
parent 15bc3a4f42
commit 6f10578aa1

View File

@@ -2176,17 +2176,6 @@ printf("SIevent size: %d\n", sizeof(SIevent));
}
/* was: commandAllEventsChannelID sendAllEvents */
inline static bool sortbyEventid (const CChannelEvent& a, const CChannelEvent& b)
{
return (a.channelID == b.channelID && a.eventID == b.eventID);
}
inline static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b)
{
return a.startTime < b.startTime;
}
void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "")
{
dprintf("sendAllEvents for " PRINTF_CHANNEL_ID_TYPE "\n", serviceUniqueKey);
@@ -2245,11 +2234,6 @@ void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventL
break; // sind nach serviceID und startzeit sortiert -> nicht weiter suchen
}
unlockEvents();
if(search != 0 && !eList.empty()){
sort(eList.begin(),eList.end(),sortByDateTime);
unique(eList.begin(),eList.end(),sortbyEventid);
eList.erase(unique(eList.begin(),eList.end(),sortbyEventid),eList.end());
}
}
}