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

@@ -243,22 +243,19 @@ Directory::Walk(bool recursive, const SongFilter *filter,
if (visit_song) {
for (auto &song : songs){
const LightSong song2 = song.Export();
if ((filter == nullptr || filter->Match(song2)) &&
!visit_song(song2, error))
return false;
if (filter == nullptr || filter->Match(song2))
visit_song(song2);
}
}
if (visit_playlist) {
for (const PlaylistInfo &p : playlists)
if (!visit_playlist(p, Export(), error))
return false;
visit_playlist(p, Export());
}
for (auto &child : children) {
if (visit_directory &&
!visit_directory(child.Export(), error))
return false;
if (visit_directory)
visit_directory(child.Export());
if (recursive &&
!child.Walk(recursive, filter,