From 7cbc0ca1d16664ec53d9489f982d7b83bfa8bb60 Mon Sep 17 00:00:00 2001 From: Ramana Radhakrishnan Date: Wed, 6 May 2020 00:47:10 +0100 Subject: [PATCH] [PATCH] [ring_buffer.h] Improve commentary for RingBuffer (#5518) bytes_available refers to the number of bytes used in the ring buffer. At the same time, fix a typo. --- src/support/ring_buffer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/support/ring_buffer.h b/src/support/ring_buffer.h index 7a1bcb6..d3227ad 100644 --- a/src/support/ring_buffer.h +++ b/src/support/ring_buffer.h @@ -149,7 +149,7 @@ class RingBuffer { bytes_available_ += size; } /*! - * \brief Writen data into the buffer by give it a non-blocking callback function. + * \brief Written data into the buffer by give it a non-blocking callback function. * * \param frecv A receive function handle * \param max_nbytes Maximum number of bytes can write. @@ -180,9 +180,9 @@ class RingBuffer { private: // buffer head size_t head_ptr_{0}; - // number of bytes in the buffer. + // number of bytes occupied in the buffer. size_t bytes_available_{0}; - // The internald ata ring. + // The internal data ring. std::vector ring_; }; } // namespace support -- 2.7.4