diff options
author | Vasily Gerasimov <UgnineSirdis@gmail.com> | 2022-02-10 16:49:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:10 +0300 |
commit | 1eb755fbca92172a6aec2f57371b2b3a19dfab43 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/containers/ring_buffer | |
parent | 6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (diff) | |
download | ydb-1eb755fbca92172a6aec2f57371b2b3a19dfab43.tar.gz |
Restoring authorship annotation for Vasily Gerasimov <UgnineSirdis@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/ring_buffer')
-rw-r--r-- | library/cpp/containers/ring_buffer/ring_buffer.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/containers/ring_buffer/ring_buffer.h b/library/cpp/containers/ring_buffer/ring_buffer.h index c9f0acf7c2..41220dcf6b 100644 --- a/library/cpp/containers/ring_buffer/ring_buffer.h +++ b/library/cpp/containers/ring_buffer/ring_buffer.h @@ -12,12 +12,12 @@ public: Items.reserve(MaxSize); } - TSimpleRingBuffer(const TSimpleRingBuffer&) = default; - TSimpleRingBuffer(TSimpleRingBuffer&&) = default; - - TSimpleRingBuffer& operator=(const TSimpleRingBuffer&) = default; - TSimpleRingBuffer& operator=(TSimpleRingBuffer&&) = default; - + TSimpleRingBuffer(const TSimpleRingBuffer&) = default; + TSimpleRingBuffer(TSimpleRingBuffer&&) = default; + + TSimpleRingBuffer& operator=(const TSimpleRingBuffer&) = default; + TSimpleRingBuffer& operator=(TSimpleRingBuffer&&) = default; + // First available item size_t FirstIndex() const { return Begin; @@ -55,11 +55,11 @@ public: } } - void Clear() { - Items.clear(); - Begin = 0; - } - + void Clear() { + Items.clear(); + Begin = 0; + } + private: size_t RealIndex(size_t index) const { return index % MaxSize; |