db/Visitor: remove the Error parameter

Implementations shall use exceptions instead.
This commit is contained in:
Max Kellermann
2016-10-29 10:04:43 +02:00
parent 78bf4ef5fa
commit 3ff728ab02
9 changed files with 135 additions and 169 deletions

View File

@@ -274,9 +274,8 @@ SimpleDatabase::Visit(const DatabaseSelection &selection,
if (r.uri == nullptr) {
/* it's a directory */
if (selection.recursive && visit_directory &&
!visit_directory(r.directory->Export(), error))
return false;
if (selection.recursive && visit_directory)
visit_directory(r.directory->Export());
return r.directory->Walk(selection.recursive, selection.filter,
visit_directory, visit_song,
@@ -289,8 +288,8 @@ SimpleDatabase::Visit(const DatabaseSelection &selection,
Song *song = r.directory->FindSong(r.uri);
if (song != nullptr) {
const LightSong song2 = song->Export();
return !selection.Match(song2) ||
visit_song(song2, error);
if (selection.Match(song2))
visit_song(song2);
}
}
}