mpd: make functions take item consumer instead of returning vector of items

This commit is contained in:
Andrzej Rybczak
2012-10-01 20:44:22 +02:00
parent 60faa15462
commit 9a292ca20d
14 changed files with 206 additions and 209 deletions

View File

@@ -22,6 +22,7 @@
#define _UTILITY_COMPARATORS
#include <string>
#include "exec_item.h"
#include "mpdpp.h"
#include "settings.h"
#include "menu.h"
@@ -57,6 +58,11 @@ public:
bool operator()(const std::pair<A, B> &a, const std::pair<A, B> &b) const {
return m_cmp(a.first, b.first) < 0;
}
template <typename ItemT, typename FunT>
bool operator()(const ExecItem<ItemT, FunT> &a, const ExecItem<ItemT, FunT> &b) const {
return m_cmp(a.item(), b.item());
}
};
class LocaleBasedItemSorting