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/input/RewindInputPlugin.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 '')
-rw-r--r-- | src/input/RewindInputPlugin.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/input/RewindInputPlugin.cxx b/src/input/RewindInputPlugin.cxx index d68fd3d73..7a88d4f52 100644 --- a/src/input/RewindInputPlugin.cxx +++ b/src/input/RewindInputPlugin.cxx @@ -24,8 +24,6 @@ #include "InputPlugin.hxx" #include "Tag.hxx" -#include <glib.h> - #include <assert.h> #include <string.h> #include <stdio.h> @@ -112,11 +110,11 @@ input_rewind_close(struct input_stream *is) } static bool -input_rewind_check(struct input_stream *is, GError **error_r) +input_rewind_check(struct input_stream *is, Error &error) { RewindInputStream *r = (RewindInputStream *)is; - return input_stream_check(r->input, error_r); + return input_stream_check(r->input, error); } static void @@ -146,7 +144,7 @@ input_rewind_available(struct input_stream *is) static size_t input_rewind_read(struct input_stream *is, void *ptr, size_t size, - GError **error_r) + Error &error) { RewindInputStream *r = (RewindInputStream *)is; @@ -167,7 +165,7 @@ input_rewind_read(struct input_stream *is, void *ptr, size_t size, } else { /* pass method call to underlying stream */ - size_t nbytes = input_stream_read(r->input, ptr, size, error_r); + size_t nbytes = input_stream_read(r->input, ptr, size, error); if (r->input->offset > (goffset)sizeof(r->buffer)) /* disable buffering */ @@ -197,7 +195,7 @@ input_rewind_eof(struct input_stream *is) static bool input_rewind_seek(struct input_stream *is, goffset offset, int whence, - GError **error_r) + Error &error) { RewindInputStream *r = (RewindInputStream *)is; @@ -216,7 +214,7 @@ input_rewind_seek(struct input_stream *is, goffset offset, int whence, return true; } else { bool success = input_stream_seek(r->input, offset, whence, - error_r); + error); r->CopyAttributes(); /* disable the buffer, because r->input has left the |