diff options
author | Max Kellermann <max@duempel.org> | 2014-02-27 17:27:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-27 17:27:23 +0100 |
commit | 1c772ef69947127e01e7171b007a2295d51e7ae7 (patch) | |
tree | 1461d15b1f94e29ef23a750b97dcf16d77de9fd5 /src/db/DatabaseQueue.cxx | |
parent | 809b89b5af5eaf7abc3240d786cda15f354b6624 (diff) |
Playlist: use the Error library to return errors
Diffstat (limited to 'src/db/DatabaseQueue.cxx')
-rw-r--r-- | src/db/DatabaseQueue.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/db/DatabaseQueue.cxx b/src/db/DatabaseQueue.cxx index be012647a..490678188 100644 --- a/src/db/DatabaseQueue.cxx +++ b/src/db/DatabaseQueue.cxx @@ -23,7 +23,6 @@ #include "Interface.hxx" #include "Partition.hxx" #include "Instance.hxx" -#include "util/Error.hxx" #include "DetachedSong.hxx" #include <functional> @@ -32,17 +31,12 @@ static bool AddToQueue(Partition &partition, const LightSong &song, Error &error) { const Storage &storage = *partition.instance.storage; - PlaylistResult result = + unsigned id = partition.playlist.AppendSong(partition.pc, DatabaseDetachSong(storage, song), - nullptr); - if (result != PlaylistResult::SUCCESS) { - error.Set(playlist_domain, int(result), "Playlist error"); - return false; - } - - return true; + error); + return id != 0; } bool |