From f7fb8a33d7265126fcc98eca2cd51aa7c268d851 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 25 Jul 2018 11:21:47 +0200 Subject: [PATCH] db/Print: pass TagType to PrintUniqueTags() --- src/command/DatabaseCommands.cxx | 2 +- src/db/DatabasePrint.cxx | 8 +++----- src/db/DatabasePrint.hxx | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx index d9ff60316..bed435327 100644 --- a/src/command/DatabaseCommands.cxx +++ b/src/command/DatabaseCommands.cxx @@ -289,7 +289,7 @@ handle_list(Client &client, Request args, Response &r) PrintSongUris(r, client.GetPartition(), filter.get()); else PrintUniqueTags(r, client.GetPartition(), - tagType, group_mask, filter.get()); + TagType(tagType), group_mask, filter.get()); return CommandResult::OK; } diff --git a/src/db/DatabasePrint.cxx b/src/db/DatabasePrint.cxx index 89172299d..dfcdf02ce 100644 --- a/src/db/DatabasePrint.cxx +++ b/src/db/DatabasePrint.cxx @@ -303,7 +303,7 @@ PrintUniqueTag(Response &r, TagType tag_type, void PrintUniqueTags(Response &r, Partition &partition, - unsigned type, TagMask group_mask, + TagType type, TagMask group_mask, const SongFilter *filter) { assert(type < TAG_NUM_OF_ITEM_TYPES); @@ -313,8 +313,6 @@ PrintUniqueTags(Response &r, Partition &partition, const DatabaseSelection selection("", true, filter); using namespace std::placeholders; - const auto f = std::bind(PrintUniqueTag, std::ref(r), - (TagType)type, _1); - db.VisitUniqueTags(selection, (TagType)type, - group_mask, f); + const auto f = std::bind(PrintUniqueTag, std::ref(r), type, _1); + db.VisitUniqueTags(selection, type, group_mask, f); } diff --git a/src/db/DatabasePrint.hxx b/src/db/DatabasePrint.hxx index ab462de9e..c3fb1545d 100644 --- a/src/db/DatabasePrint.hxx +++ b/src/db/DatabasePrint.hxx @@ -55,7 +55,7 @@ PrintSongUris(Response &r, Partition &partition, void PrintUniqueTags(Response &r, Partition &partition, - unsigned type, TagMask group_mask, + TagType type, TagMask group_mask, const SongFilter *filter); #endif