db/Interface: migrate visitor methods from class Error to C++ exceptions

This commit is contained in:
Max Kellermann
2016-10-29 10:21:57 +02:00
parent 9a9da7b077
commit fac8edd47a
27 changed files with 190 additions and 331 deletions

View File

@@ -36,16 +36,15 @@ AddSong(const Storage &storage, const char *playlist_path_utf8,
return true;
}
bool
void
search_add_to_playlist(const Database &db, const Storage &storage,
const char *uri, const char *playlist_path_utf8,
const SongFilter *filter,
Error &error)
const SongFilter *filter)
{
const DatabaseSelection selection(uri, true, filter);
using namespace std::placeholders;
const auto f = std::bind(AddSong, std::ref(storage),
playlist_path_utf8, _1);
return db.Visit(selection, f, error);
db.Visit(selection, f);
}