gui/channellist.cpp: remove CmpChannel..

This commit is contained in:
[CST] Focus
2012-04-05 18:57:50 +04:00
parent 18ea2c8cff
commit 07a250130b

View File

@@ -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());