From 3f899f83fff45d27132e7fde00150f38e0ffd3a0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 22 Oct 2013 00:46:02 +0200 Subject: [PATCH] Playlist*, Queue: use GetDatabase() overload without Error Don't use IgnoreError() when there's an overload that does not try to give us one. --- src/PlaylistEdit.cxx | 2 +- src/PlaylistPrint.cxx | 2 +- src/PlaylistSong.cxx | 2 +- src/QueueSave.cxx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PlaylistEdit.cxx b/src/PlaylistEdit.cxx index ff2ad5baa..80916adaf 100644 --- a/src/PlaylistEdit.cxx +++ b/src/PlaylistEdit.cxx @@ -115,7 +115,7 @@ playlist::AppendURI(struct player_control &pc, if (uri_has_scheme(uri)) { song = Song::NewRemote(uri); } else { - db = GetDatabase(IgnoreError()); + db = GetDatabase(); if (db == nullptr) return PlaylistResult::NO_SUCH_SONG; diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx index 01c3fc3b1..95b77aa0d 100644 --- a/src/PlaylistPrint.cxx +++ b/src/PlaylistPrint.cxx @@ -115,7 +115,7 @@ playlist_print_changes_position(Client &client, static bool PrintSongDetails(Client &client, const char *uri_utf8) { - const Database *db = GetDatabase(IgnoreError()); + const Database *db = GetDatabase(); if (db == nullptr) return false; diff --git a/src/PlaylistSong.cxx b/src/PlaylistSong.cxx index a117a85da..60774dc36 100644 --- a/src/PlaylistSong.cxx +++ b/src/PlaylistSong.cxx @@ -104,7 +104,7 @@ playlist_check_load_song(const Song *song, const char *uri, bool secure) if (dest == nullptr) return nullptr; } else { - const Database *db = GetDatabase(IgnoreError()); + const Database *db = GetDatabase(); if (db == nullptr) return nullptr; diff --git a/src/QueueSave.cxx b/src/QueueSave.cxx index 1875a1270..6a1a51992 100644 --- a/src/QueueSave.cxx +++ b/src/QueueSave.cxx @@ -114,7 +114,7 @@ queue_load_song(TextFile &file, const char *line, queue &queue) if (uri_has_scheme(uri)) { song = Song::NewRemote(uri); } else { - db = GetDatabase(IgnoreError()); + db = GetDatabase(); if (db == nullptr) return;