aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/Helpers.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-04-25 18:39:21 +0200
committerMax Kellermann <max@duempel.org>2014-04-25 18:39:21 +0200
commit154e601f4e99e5334005279eb64ba6a541d9e844 (patch)
treee5a8bfc460f29847f69b04b384c771a0f1e39963 /src/db/Helpers.cxx
parent4cca75b2e17f3145dfe156285f30b86210662b79 (diff)
downloadmpd-154e601f4e99e5334005279eb64ba6a541d9e844.tar.gz
mpd-154e601f4e99e5334005279eb64ba6a541d9e844.tar.xz
mpd-154e601f4e99e5334005279eb64ba6a541d9e844.zip
db/Helpers: split library
Diffstat (limited to '')
-rw-r--r--src/db/Helpers.cxx36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/db/Helpers.cxx b/src/db/Helpers.cxx
index 5b1e1d6c6..b849e73e8 100644
--- a/src/db/Helpers.cxx
+++ b/src/db/Helpers.cxx
@@ -22,13 +22,9 @@
#include "Interface.hxx"
#include "LightSong.hxx"
#include "tag/Tag.hxx"
-#include "tag/TagBuilder.hxx"
-#include "tag/Set.hxx"
-#include <functional>
#include <set>
-#include <assert.h>
#include <string.h>
struct StringLess {
@@ -40,38 +36,6 @@ struct StringLess {
typedef std::set<const char *, StringLess> StringSet;
-static bool
-CollectTags(TagSet &set, TagType tag_type, uint32_t group_mask,
- const LightSong &song)
-{
- assert(song.tag != nullptr);
- const Tag &tag = *song.tag;
-
- set.InsertUnique(tag, tag_type, group_mask);
- return true;
-}
-
-bool
-VisitUniqueTags(const Database &db, const DatabaseSelection &selection,
- TagType tag_type, uint32_t group_mask,
- VisitTag visit_tag,
- Error &error)
-{
- TagSet set;
-
- using namespace std::placeholders;
- const auto f = std::bind(CollectTags, std::ref(set),
- tag_type, group_mask, _1);
- if (!db.Visit(selection, f, error))
- return false;
-
- for (const auto &value : set)
- if (!visit_tag(value, error))
- return false;
-
- return true;
-}
-
static void
StatsVisitTag(DatabaseStats &stats, StringSet &artists, StringSet &albums,
const Tag &tag)