aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderBuffer.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-23 22:08:59 +0200
committerMax Kellermann <max@duempel.org>2013-10-23 23:12:02 +0200
commit93deb844996120b6326345d6d87e803142dd1968 (patch)
treed6c00669efffad1b15fc45e03158d6838a7e5827 /src/DecoderBuffer.cxx
parentc4d4011c63808a64ca20a4b03fd455a83c23cc33 (diff)
downloadmpd-93deb844996120b6326345d6d87e803142dd1968.tar.gz
mpd-93deb844996120b6326345d6d87e803142dd1968.tar.xz
mpd-93deb844996120b6326345d6d87e803142dd1968.zip
input_stream: rename struct to InputStream
Diffstat (limited to '')
-rw-r--r--src/DecoderBuffer.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/DecoderBuffer.cxx b/src/DecoderBuffer.cxx
index 16e6e7f7f..6aad53cb2 100644
--- a/src/DecoderBuffer.cxx
+++ b/src/DecoderBuffer.cxx
@@ -28,7 +28,7 @@
struct DecoderBuffer {
Decoder *decoder;
- struct input_stream *is;
+ InputStream *is;
/** the allocated size of the buffer */
size_t size;
@@ -45,17 +45,16 @@ struct DecoderBuffer {
};
DecoderBuffer *
-decoder_buffer_new(Decoder *decoder, struct input_stream *is,
+decoder_buffer_new(Decoder *decoder, InputStream &is,
size_t size)
{
DecoderBuffer *buffer = (DecoderBuffer *)
g_malloc(sizeof(*buffer) - sizeof(buffer->data) + size);
- assert(is != nullptr);
assert(size > 0);
buffer->decoder = decoder;
- buffer->is = is;
+ buffer->is = &is;
buffer->size = size;
buffer->length = 0;
buffer->consumed = 0;
@@ -105,7 +104,7 @@ decoder_buffer_fill(DecoderBuffer *buffer)
/* buffer is full */
return false;
- nbytes = decoder_read(buffer->decoder, buffer->is,
+ nbytes = decoder_read(buffer->decoder, *buffer->is,
buffer->data + buffer->length,
buffer->size - buffer->length);
if (nbytes == 0)