Mercurial > hg > btrack
changeset 107:e354bb51b875
Added some comments to CircularBuffer
author | Adam Stark <adamstark.uk@gmail.com> |
---|---|
date | Tue, 12 Sep 2017 08:27:51 +0100 |
parents | 6f5ba0250afd |
children | a6701b3f636f |
files | src/CircularBuffer.h |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/CircularBuffer.h Tue Sep 12 01:00:53 2017 +0100 +++ b/src/CircularBuffer.h Tue Sep 12 08:27:51 2017 +0100 @@ -27,7 +27,8 @@ //======================================================================= /** A circular buffer that allows you to add new samples to the end * whilst removing them from the beginning. This is implemented in an - * efficient way which doesn't involve any memory allocation + * efficient way which doesn't involve any memory allocation as samples + * are added to the end of the buffer */ class CircularBuffer { @@ -62,6 +63,7 @@ writeIndex = 0; } + /** Returns the size of the buffer */ int size() { return static_cast<int> (buffer.size());