diff options
author | Max Kellermann <max@duempel.org> | 2013-08-10 18:02:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-04 18:14:22 +0200 |
commit | 29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch) | |
tree | 79766830b55ebca38ddbce84d8d548227eedb69e /src/DatabaseQueue.cxx | |
parent | c9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff) | |
download | mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip |
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to 'src/DatabaseQueue.cxx')
-rw-r--r-- | src/DatabaseQueue.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/DatabaseQueue.cxx b/src/DatabaseQueue.cxx index 67031b730..79ff004a7 100644 --- a/src/DatabaseQueue.cxx +++ b/src/DatabaseQueue.cxx @@ -23,17 +23,17 @@ #include "DatabaseGlue.hxx" #include "DatabasePlugin.hxx" #include "Partition.hxx" +#include "util/Error.hxx" #include <functional> static bool -AddToQueue(Partition &partition, Song &song, GError **error_r) +AddToQueue(Partition &partition, Song &song, Error &error) { enum playlist_result result = partition.playlist.AppendSong(partition.pc, &song, NULL); if (result != PLAYLIST_RESULT_SUCCESS) { - g_set_error(error_r, playlist_quark(), result, - "Playlist error"); + error.Set(playlist_domain, result, "Playlist error"); return false; } @@ -42,13 +42,13 @@ AddToQueue(Partition &partition, Song &song, GError **error_r) bool AddFromDatabase(Partition &partition, const DatabaseSelection &selection, - GError **error_r) + Error &error) { - const Database *db = GetDatabase(error_r); + const Database *db = GetDatabase(error); if (db == nullptr) return false; using namespace std::placeholders; const auto f = std::bind(AddToQueue, std::ref(partition), _1, _2); - return db->Visit(selection, f, error_r); + return db->Visit(selection, f, error); } |