aboutsummaryrefslogtreecommitdiff
path: root/src/DatabasePrint.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-07 23:59:17 +0200
committerMax Kellermann <max@duempel.org>2012-08-08 00:47:45 +0200
commit0823711106912fc75f1bdb2461243b12ba670f8b (patch)
treeee2bc012a9c3fb8e25b149a0b8f19d2421795256 /src/DatabasePrint.cxx
parent860e9eb8c9ad07721aad4526046753d6fcc3b3ac (diff)
locate: add a per-item "fold_case" flag
Merge locate_song_search() and locate_song_match().
Diffstat (limited to 'src/DatabasePrint.cxx')
-rw-r--r--src/DatabasePrint.cxx28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/DatabasePrint.cxx b/src/DatabasePrint.cxx
index 0c5b2bb9..9f2f46d6 100644
--- a/src/DatabasePrint.cxx
+++ b/src/DatabasePrint.cxx
@@ -139,32 +139,10 @@ db_selection_print(struct client *client, const DatabaseSelection &selection,
}
static bool
-SearchPrintSong(struct client *client, const struct locate_item_list *criteria,
- song &song)
-{
- if (locate_song_search(&song, criteria))
- song_print_info(client, &song);
-
- return true;
-}
-
-bool
-searchForSongsIn(struct client *client, const char *uri,
- const struct locate_item_list *criteria,
- GError **error_r)
-{
- const DatabaseSelection selection(uri, true);
-
- using namespace std::placeholders;
- const auto f = std::bind(SearchPrintSong, client, criteria, _1);
- return GetDatabase()->Visit(selection, f, error_r);
-}
-
-static bool
MatchPrintSong(struct client *client, const struct locate_item_list *criteria,
song &song)
{
- if (locate_song_match(&song, criteria))
+ if (locate_list_song_match(&song, criteria))
song_print_info(client, &song);
return true;
@@ -197,7 +175,7 @@ static bool
stats_visitor_song(SearchStats &stats, const struct locate_item_list *criteria,
song &song)
{
- if (locate_song_match(&song, criteria)) {
+ if (locate_list_song_match(&song, criteria)) {
stats.numberOfSongs++;
stats.playTime += song_get_duration(&song);
}
@@ -282,7 +260,7 @@ unique_tags_visitor_song(struct client *client,
const struct locate_item_list *criteria,
StringSet &set, song &song)
{
- if (locate_song_match(&song, criteria))
+ if (locate_list_song_match(&song, criteria))
visitTag(client, set, song, tag_type);
return true;