diff options
Diffstat (limited to 'epgsearchext.c')
-rw-r--r-- | epgsearchext.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/epgsearchext.c b/epgsearchext.c index 8f71241..ba58b3b 100644 --- a/epgsearchext.c +++ b/epgsearchext.c @@ -1663,6 +1663,25 @@ bool cSearchExts::CheckForAutoDelete(cSearchExt* SearchExt) return delSearch; } +void cSearchExts::SortBy(int(*compar)(const void *, const void *)) +{ + int n = Count(); + cListObject *a[n]; + cListObject *object = objects; + int i = 0; + while (object && i < n) { + a[i++] = object; + object = object->Next(); + } + qsort(a, n, sizeof(cListObject *), compar); + objects = lastObject = NULL; + for (i = 0; i < n; i++) { + a[i]->Unlink(); + count--; + Add(a[i]); + } +} + cSearchResult::cSearchResult(const cEvent* Event, int searchID) : event(Event), blacklist(NULL), needsTimer(true) { search = SearchExts.GetSearchFromID(searchID); |