From ce87898d8f28077bbbee829c99df2296fb26e880 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 6 Nov 2014 19:29:09 +0100 Subject: [PATCH] zapit: channel.h - change comparative criteria for freq sort --- src/zapit/include/zapit/channel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zapit/include/zapit/channel.h b/src/zapit/include/zapit/channel.h index 2b7130571..b3c020d9e 100644 --- a/src/zapit/include/zapit/channel.h +++ b/src/zapit/include/zapit/channel.h @@ -312,10 +312,10 @@ struct CmpChannelByFreq: public std::binary_function getFreqId() == c2->getFreqId()) + if((c1->getTransponderId() == c2->getTransponderId()) && ((uint64_t)c1->getFreqId() <<32 | c1->polarization <<16 | c1->getSatellitePosition()) == ((uint64_t)c2->getFreqId()<<32 | c2->polarization <<16| c2->getSatellitePosition())) return std::lexicographical_compare(c1->getName().begin(), c1->getName().end(), c2->getName().begin(), c2->getName().end(), comparetolower); else - return c1->getFreqId() < c2->getFreqId(); + return ((uint64_t)c1->getFreqId()<<32 | c1->polarization <<16 | c1->getSatellitePosition()) < ((uint64_t)c2->getFreqId()<<32 | c2->polarization <<16 | c2->getSatellitePosition()); ; }; };