Skip to content

Commit

Permalink
[PATCH] [ring_buffer.h] Improve commentary for RingBuffer (apache#5518)
Browse files Browse the repository at this point in the history
bytes_available refers to the number of bytes used in the ring
buffer. At the same time, fix a typo.
  • Loading branch information
Ramana Radhakrishnan authored and Trevor Morris committed Jun 18, 2020
1 parent 83fba09 commit ca0fa05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/support/ring_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<char> ring_;
};
} // namespace support
Expand Down

0 comments on commit ca0fa05

Please sign in to comment.