From 0a2aad0200af8d7fd43e72600eaeea043fb1d37a Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Sat, 2 Jun 2012 19:13:11 +0200 Subject: fix compile but crashes --- util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 08514bf..a508525 100644 --- a/util.c +++ b/util.c @@ -143,9 +143,9 @@ void CleanString (unsigned char *String) struct tChannelIDCompare { - bool operator() (const tChannelID& lhs, const tChannelID& rhs) + bool operator() (const tChannelID& lhs, const tChannelID& rhs) const { - return lhs.ToString() < rhs.ToString(); + return *lhs.ToString() < *rhs.ToString(); } }; @@ -169,14 +169,14 @@ cAddEventThread::cAddEventThread(void) :cThread("cAddEventThread"), LastHandleEvent() { // list = new cList; - map_list = new std::map*>; + map_list = new std::map*,tChannelIDCompare>; } cAddEventThread::~cAddEventThread(void) { LOCK_THREAD; // list->cList::Clear(); - std::map*>::iterator it; + std::map*,tChannelIDCompare>::iterator it; for ( it=map_list->begin() ; it != map_list->end(); it++ ) (*it).second->cList::Clear(); Cancel(3); @@ -197,7 +197,7 @@ void cAddEventThread::Action(void) // EpgHandlers.DropOutdated(schedule, e->GetEvent()->StartTime(), e->GetEvent()->EndTime(), e->GetEvent()->TableID(), e->GetEvent()->Version()); // list->Del(e); // } - std::map*>::iterator it; + std::map*,tChannelIDCompare>::iterator it; if (schedules) { for ( it=map_list->begin() ; it != map_list->end(); it++ ) { (*it).second->cList::Clear(); -- cgit v1.2.3