mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
gui/channellist.cpp: remove CmpChannel..
This commit is contained in:
@@ -210,40 +210,6 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to)
|
||||
events.clear();
|
||||
}
|
||||
|
||||
struct CmpChannelBySat: public binary_function <const CZapitChannel * const, const CZapitChannel * const, bool>
|
||||
{
|
||||
static bool comparetolower(const char a, const char b)
|
||||
{
|
||||
return tolower(a) < tolower(b);
|
||||
};
|
||||
|
||||
bool operator() (const CZapitChannel * const c1, const CZapitChannel * const c2)
|
||||
{
|
||||
if(c1->getSatellitePosition() == c2->getSatellitePosition())
|
||||
return std::lexicographical_compare(c1->getName().begin(), c1->getName().end(), c2->getName().begin(), c2->getName().end(), comparetolower);
|
||||
else
|
||||
return c1->getSatellitePosition() < c2->getSatellitePosition();
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
struct CmpChannelByFreq: public binary_function <const CZapitChannel * const, const CZapitChannel * const, bool>
|
||||
{
|
||||
static bool comparetolower(const char a, const char b)
|
||||
{
|
||||
return tolower(a) < tolower(b);
|
||||
};
|
||||
|
||||
bool operator() (const CZapitChannel * const c1, const CZapitChannel * const c2)
|
||||
{
|
||||
if(c1->getFreqId() == c2->getFreqId())
|
||||
return std::lexicographical_compare(c1->getName().begin(), c1->getName().end(), c2->getName().begin(), c2->getName().end(), comparetolower);
|
||||
else
|
||||
return c1->getFreqId() < c2->getFreqId();
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
void CChannelList::SortAlpha(void)
|
||||
{
|
||||
sort(chanlist.begin(), chanlist.end(), CmpChannelByChName());
|
||||
|
Reference in New Issue
Block a user