From 877ce0aab52afc05cf007e682c4b9527706712aa Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sat, 16 Jan 2016 13:47:08 +0000 Subject: [PATCH] Add/correct some comments --- src/cpbuffer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpbuffer.h b/src/cpbuffer.h index 751cbf8..0dc711e 100644 --- a/src/cpbuffer.h +++ b/src/cpbuffer.h @@ -47,6 +47,7 @@ template class CPBuffer return buf[dest_idx]; } + // Remove the given number of bytes from the start of the buffer. void consume(int amount) noexcept { cur_idx += amount; @@ -54,6 +55,7 @@ template class CPBuffer length -= amount; } + // Extract bytes from the buffer. The bytes remain in the buffer. void extract(char *dest, int index, int length) noexcept { index += cur_idx; @@ -69,7 +71,7 @@ template class CPBuffer } } - // Extract string of give length from given index + // Extract string of given length from given index // Throws: std::bad_alloc on allocation failure std::string extract_string(int index, int length) { -- 2.25.1