From 333d226ed0044cf6a6387e03805be2d7f6dac6f2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 29 Aug 2012 19:27:03 +0200 Subject: SongFilter: convert to a C++ class --- src/DatabasePrint.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/DatabasePrint.cxx') diff --git a/src/DatabasePrint.cxx b/src/DatabasePrint.cxx index 9ff833ffd..97ff9c12c 100644 --- a/src/DatabasePrint.cxx +++ b/src/DatabasePrint.cxx @@ -120,12 +120,12 @@ db_selection_print(struct client *client, const DatabaseSelection &selection, return false; using namespace std::placeholders; - const auto d = selection.match == nullptr + const auto d = selection.filter == nullptr ? std::bind(PrintDirectory, client, _1) : VisitDirectory(); const auto s = std::bind(full ? PrintSongFull : PrintSongBrief, client, _1); - const auto p = selection.match == nullptr + const auto p = selection.filter == nullptr ? std::bind(full ? PrintPlaylistFull : PrintPlaylistBrief, client, _1, _2) : VisitPlaylist(); @@ -155,14 +155,14 @@ stats_visitor_song(SearchStats &stats, song &song) bool searchStatsForSongsIn(struct client *client, const char *name, - const struct locate_item_list *criteria, + const SongFilter *filter, GError **error_r) { const Database *db = GetDatabase(error_r); if (db == nullptr) return false; - const DatabaseSelection selection(name, true, criteria); + const DatabaseSelection selection(name, true, filter); SearchStats stats; stats.numberOfSongs = 0; @@ -211,14 +211,14 @@ PrintUniqueTag(struct client *client, enum tag_type tag_type, bool listAllUniqueTags(struct client *client, int type, - const struct locate_item_list *criteria, + const SongFilter *filter, GError **error_r) { const Database *db = GetDatabase(error_r); if (db == nullptr) return false; - const DatabaseSelection selection("", true, criteria); + const DatabaseSelection selection("", true, filter); if (type == LOCATE_TAG_FILE_TYPE) { using namespace std::placeholders; -- cgit v1.2.3