diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/base/ringbuffer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/base/ringbuffer.cpp b/src/base/ringbuffer.cpp index d324f74f..e1761e82 100644 --- a/src/base/ringbuffer.cpp +++ b/src/base/ringbuffer.cpp @@ -31,10 +31,12 @@ namespace usdx { - RingBuffer::RingBuffer(int size) + RingBuffer::RingBuffer(int size): + buffer_count(0), + buffer_size(size), + write_pos(0), + read_pos(0) { - buffer_size = size; - ring_buffer = (char*)malloc(size); if (ring_buffer == NULL) throw "No memory"; |