From c80483d582b995e7890a581e7de03c70c51df137 Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Mon, 19 Jul 2010 17:33:50 -0700 Subject: Fixed circular buffer resizing bug. --- src/rt/circular_buffer.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/rt/circular_buffer.h') diff --git a/src/rt/circular_buffer.h b/src/rt/circular_buffer.h index c0c0da5e..2ebf23b0 100644 --- a/src/rt/circular_buffer.h +++ b/src/rt/circular_buffer.h @@ -20,10 +20,19 @@ public: bool is_empty(); private: + // Size of the buffer in bytes. size_t _buffer_sz; - size_t unit_sz; + + // Size of the data unit in bytes. + size_t _unit_sz; + + // Byte offset within the buffer where to read the next unit of data. size_t _next; + + // Number of bytes that have not been read from the buffer. size_t _unread; + + // The buffer itself. uint8_t *_buffer; }; -- cgit v1.2.3