From 93deb844996120b6326345d6d87e803142dd1968 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Oct 2013 22:08:59 +0200 Subject: input_stream: rename struct to InputStream --- src/DecoderBuffer.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/DecoderBuffer.cxx') 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) -- cgit v1.2.3